Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

jwodder/flake8-import-order-jwodder

Repository files navigation

Project Status: Unsupported – The project has reached a stable, usable state but the author(s) have ceased all work on it. A new maintainer may be desired. CI Status MIT License

GitHub | PyPI | Issues | Changelog

flake8-import-order-jwodder defines an import order style jwodder for use with flake8-import-order. The jwodder style is the same as the appnexus style bundled with flake8-import-order, except that names in from X import ... lines are sorted case-sensitively.

Installation

flake8-import-order-jwodder requires Python 3.6 or higher. Just use pip for Python 3 (You have pip, right?) to install flake8-import-order-jwodder and its dependencies:

python3 -m pip install flake8-import-order-jwodder

Example

An example of imports sorted according to the jwodder style:

from __future__ import absolute_import

import ast
from functools import *
import os
from os import path
import StringIO
import sys

import X
from X import *
from X import A
from X import B, C, b, d
import Y
from Y import *
from Y import A
from Y import B, C, D
from Y import e
import Z
from Z import A
from Z.A import A
from Z.A.B import A

from localpackage import A, b

import flake8_import_order
from flake8_import_order import *
from . import A
from . import B
from .A import A
from .B import B
from .. import A
from .. import B
from ..A import A
from ..B import B