.TH ISORT "1" "December 2014" "isort 3.9.2" "User Commands" .SH NAME isort \- program for sorting Python import definitions .SH SYNOPSIS .B isort [\fB\-h\fR] [\fB\-l\fR \fILINE_LENGTH\fR] [\fB\-s\fR \fISKIP\fR] [\fB\-ns\fR \fINOT_SKIP\fR] [\fB\-t\fR \fIFORCE_TO_TOP\fR] [\fB\-b\fR \fIKNOWN_STANDARD_LIBRARY\fR] [\fB\-o\fR \fIKNOWN_THIRD_PARTY\fR] [\fB\-p\fR \fIKNOWN_FIRST_PARTY\fR] [\fB\-m\fR \fIMODE\fR] [\fB\-i\fR \fIINDENT\fR] [\fB\-a\fR \fIADD_IMPORTS\fR] [\fB\-af\fR] [\fB\-r\fR \fIREMOVE_IMPORTS\fR] [\fB\-ls\fR] [\fB\-d\fR] [\fB\-c\fR] [\fB\-sl\fR] [\fB\-sd\fR \fIDEFAULT_SECTION\fR] [\fB\-df\fR] [\fB\-e\fR] [\fB\-rc\fR] [\fB\-ot\fR] [\fB\-ac\fR] [\fB\-cs\fR] [\fB\-v\fR] [\fB\-vb\fR] [\fB\-sp\fR \fISETTINGS_PATH\fR] .IR file ... .SH DESCRIPTION .B isort sorts Python import definitions alphabetically within logical sections. .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-l\fR \fILINE_LENGTH\fR, \fB\-\-lines\fR \fILINE_LENGTH\fR The maximum length of an import line (used for wrapping long imports). .TP \fB\-s\fR \fISKIP\fR, \fB\-\-skip\fR \fISKIP\fR Files that sort imports should skip over. .TP \fB\-ns\fR \fINOT_SKIP\fR, \fB\-\-dont\-skip\fR \fINOT_SKIP\fR Files that sort imports should never skip over. .TP \fB\-t\fR \fIFORCE_TO_TOP, \fB\-\-top\fR \fIFORCE_TO_TOP\fR Force specific imports to the top of their appropriate section. .TP \fB\-b\fR \fIKNOWN_STANDARD_LIBRARY\fR, \fB\-\-builtin\fR \fIKNOWN_STANDARD_LIBRARY\fR Force isort to recognize a module as part of the python standard library. .TP \fB\-o\fR \fIKNOWN_THIRD_PARTY\fR, \fB\-\-thirdparty\fR \fIKNOWN_THIRD_PARTY\fR Force isort to recognize a module as being part of a third party library. .TP \fB\-p\fR \fIKNOWN_FIRST_PARTY\fR, \fB\-\-project\fR \fIKNOWN_FIRST_PARTY\fR Force isort to recognize a module as being part of the current python project. .TP \fB\-m\fR \fIMODE\fR, \fB\-\-multi_line\fR \fIMODE\fR Multi line output (0=grid, 1=vertical, 2=hanging, 3=vert-hanging, 4=vert-grid, 5=vert-grid-grouped). .TP \fB\-i\fR \fIINDENT\fR, \fB\-\-indent\fR \fIINDENT\fR String to place for indents; defaults to " " (4 spaces). .TP \fB\-a\fR \fIADD_IMPORTS\fR, \fB\-\-add_import\fR \fIADD_IMPORTS\fR Adds the specified import line to all files, automatically determining correct placement. .TP \fB\-af\fR, \fB\-\-force_adds\fR Forces import adds even if the original file is empty. .TP \fB\-r\fR \fIREMOVE_IMPORTS\fR, \fB\-\-remove_import\fR \fIREMOVE_IMPORTS\fR Removes the specified import from all files. .TP \fB\-ls\fR, \fB\-\-length_sort\fR Sort imports by their string length. .TP \fB\-d\fR, \fB\-\-stdout\fR Force resulting output to stdout, instead of in-place. .TP \fB\-c\fR, \fB\-\-check\-only\fR Checks the file for unsorted imports and prints them to the command line without modifying the file. .TP \fB\-sl\fR, \fB\-\-force_single_line_imports\fR Forces all from imports to appear on their own line. .TP \fB\-sd\fR \fIDEFAULT_SECTION\fR, \fB\-\-section\-default\fR \fIDEFAULT_SECTION\fR Sets the default section for imports (by default, \fIFIRSTPARTY\fR). Possible values: .IR FUTURE ", " ISTDLIB ", " THIRDPARTY ", " FIRSTPARTY ", " LOCALFOLDER .TP \fB\-df\fR, \fB\-\-diff\fR Prints a diff of all the changes isort would make to a file, instead of changing it in place .TP \fB\-e\fR, \fB\-\-balanced\fR Balances wrapping to produce the most consistent line length possible. .TP \fB\-rc\fR, \fB\-\-recursive\fR Recursively look for Python files of which to sort imports. .TP \fB\-ot\fR, \fB\-\-order\-by\-type\fR Order imports by type in addition to alphabetically. .TP \fB\-ac\fR, \fB\-\-atomic\fR Ensures the output doesn't save if the resulting file contains syntax errors. .TP \fB\-cs\fR, \fB\-\-combine\-star\fR Ensures that if a star import is present, nothing else is imported from that namespace. .TP \fB\-v\fR, \fB\-\-version\fR Show program's version number and exit. .TP \fB\-vb\fR, \fB\-\-verbose\fR Shows verbose output, such as when files are skipped or when a check is successful. .TP \fB\-sp\fR \fISETTINGS_PATH\fR, \fB\-\-settings\-path\fR \fISETTINGS_PATH\fR Explicitly set the settings path instead of auto determining based on file location.