isort --version (return code: 0)
/#######################################################################\
`sMMy`
.yyyy- `
##soos## ./o.
` ``..-..` ``...`.`` ` ```` ``-ssso```
.s:-y- .+osssssso/. ./ossss+:so+:` :+o-`/osso:+sssssssso/
.s::y- osss+.``.`` -ssss+-.`-ossso` ssssso/::..::+ssss:::.
.s::y- /ssss+//:-.` `ssss+ `ssss+ sssso` :ssss`
.s::y- `-/+oossssso/ `ssss/ sssso ssss/ :ssss`
.y-/y- ````:ssss` ossso. :ssss: ssss/ :ssss.
`/so:` `-//::/osss+ `+ssss+-/ossso: /sso- `osssso/.
\/ `-/oooo++/- .:/++:/++/-` .. `://++/.
isort your Python imports for you so you don't have to
VERSION 4.2.5
\########################################################################/
isort --help (return code: 0)
usage: isort [-h] [-y] [-l LINE_LENGTH] [-w LINE_LENGTH] [-s SKIP]
[-ns NOT_SKIP] [-sg SKIP_GLOB] [-t FORCE_TO_TOP]
[-f KNOWN_FUTURE_LIBRARY] [-b KNOWN_STANDARD_LIBRARY]
[-o KNOWN_THIRD_PARTY] [-p KNOWN_FIRST_PARTY] [-m {0,1,2,3,4,5}]
[-i INDENT] [-a ADD_IMPORTS] [-af] [-r REMOVE_IMPORTS] [-ls] [-d]
[-c] [-sl] [-ds] [-sd DEFAULT_SECTION] [-df] [-e] [-rc] [-ot]
[-dt] [-ac] [-cs] [-ca] [-tc] [-v] [-vb] [-q] [-sp SETTINGS_PATH]
[-ff FROM_FIRST] [-wl WRAP_LENGTH] [-fgw] [-fass] [-fas] [-fss]
[-lbt LINES_BETWEEN_TYPES]
[files [files ...]]
Sort Python import definitions alphabetically within logical sections.
positional arguments:
files One or more Python source files that need their
imports sorted.
optional arguments:
-h, --help show this help message and exit
-y, --apply Tells isort to apply changes recursively without
asking
-l LINE_LENGTH, --lines LINE_LENGTH
[Deprecated] The max length of an import line (used
for wrapping long imports).
-w LINE_LENGTH, --line-width LINE_LENGTH
The max length of an import line (used for wrapping
long imports).
-s SKIP, --skip SKIP Files that sort imports should skip over. If you want
to skip multiple files you should specify twice:
--skip file1 --skip file2.
-ns NOT_SKIP, --dont-skip NOT_SKIP
Files that sort imports should never skip over.
-sg SKIP_GLOB, --skip-glob SKIP_GLOB
Files that sort imports should skip over.
-t FORCE_TO_TOP, --top FORCE_TO_TOP
Force specific imports to the top of their appropriate
section.
-f KNOWN_FUTURE_LIBRARY, --future KNOWN_FUTURE_LIBRARY
Force sortImports to recognize a module as part of the
future compatibility libraries.
-b KNOWN_STANDARD_LIBRARY, --builtin KNOWN_STANDARD_LIBRARY
Force sortImports to recognize a module as part of the
python standard library.
-o KNOWN_THIRD_PARTY, --thirdparty KNOWN_THIRD_PARTY
Force sortImports to recognize a module as being part
of a third party library.
-p KNOWN_FIRST_PARTY, --project KNOWN_FIRST_PARTY
Force sortImports to recognize a module as being part
of the current python project.
-m {0,1,2,3,4,5}, --multi_line {0,1,2,3,4,5}
Multi line output (0-grid, 1-vertical, 2-hanging,
3-vert-hanging, 4-vert-grid, 5-vert-grid-grouped).
-i INDENT, --indent INDENT
String to place for indents defaults to " " (4
spaces).
-a ADD_IMPORTS, --add_import ADD_IMPORTS
Adds the specified import line to all files,
automatically determining correct placement.
-af, --force_adds Forces import adds even if the original file is empty.
-r REMOVE_IMPORTS, --remove_import REMOVE_IMPORTS
Removes the specified import from all files.
-ls, --length_sort Sort imports by their string length.
-d, --stdout Force resulting output to stdout, instead of in-place.
-c, --check-only Checks the file for unsorted / unformatted imports and
prints them to the command line without modifying the
file.
-sl, --force-single-line-imports
Forces all from imports to appear on their own line
-ds, --no-sections Put all imports into the same section bucket
-sd DEFAULT_SECTION, --section-default DEFAULT_SECTION
Sets the default section for imports (by default
FIRSTPARTY) options: ('FUTURE', 'STDLIB',
'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER')
-df, --diff Prints a diff of all the changes isort would make to a
file, instead of changing it in place
-e, --balanced Balances wrapping to produce the most consistent line
length possible
-rc, --recursive Recursively look for Python files of which to sort
imports
-ot, --order-by-type Order imports by type in addition to alphabetically
-dt, --dont-order-by-type
Only order imports alphabetically, do not attempt type
ordering
-ac, --atomic Ensures the output doesn't save if the resulting file
contains syntax errors.
-cs, --combine-star Ensures that if a star import is present, nothing else
is imported from that namespace.
-ca, --combine-as Combines as imports on the same line.
-tc, --trailing-comma
Includes a trailing comma on multi line imports that
include parentheses.
-v, --version
-vb, --verbose Shows verbose output, such as when files are skipped
or when a check is successful.
-q, --quiet Shows extra quiet output, only errors are outputted.
-sp SETTINGS_PATH, --settings-path SETTINGS_PATH
Explicitly set the settings path instead of auto
determining based on file location.
-ff FROM_FIRST, --from-first FROM_FIRST
Switches the typical ordering preference, showing from
imports first then straight ones.
-wl WRAP_LENGTH, --wrap-length WRAP_LENGTH
Specifies how long lines that are wrapped should be,
if not set line_length is used.
-fgw, --force-grid-wrap
Force from imports to be grid wrapped regardless of
line length
-fass, --force-alphabetical-sort-within-sections
Force all imports to be sorted alphabetically within a
section
-fas, --force-alphabetical-sort
Force all imports to be sorted as a single section
-fss, --force-sort-within-sections
Force imports to be sorted by module, independent of
import_type
-lbt LINES_BETWEEN_TYPES, --lines-between-types LINES_BETWEEN_TYPES