Skip to content

Commit

Permalink
Update config option docs
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Nov 14, 2020
1 parent 2ba6bb4 commit 35f2f8f
Showing 1 changed file with 94 additions and 54 deletions.
148 changes: 94 additions & 54 deletions docs/configuration/options.md
Expand Up @@ -108,9 +108,7 @@ Forces line endings to the specified value. If not set, values will be guessed p

## Sections

Specifies a custom ordering for sections. Any custom defined sections should also be
included in this ordering. Omitting any of the default sections from this tuple may
result in unexpected sorting or an exception being raised.
**No Description**

**Type:** Tuple
**Default:** `('FUTURE', 'STDLIB', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER')`
Expand Down Expand Up @@ -343,7 +341,7 @@ Removes the specified import from all files.

## Append Only

Only adds the imports specified in --add-imports if the file contains existing imports.
Only adds the imports specified in --add-import if the file contains existing imports.

**Type:** Bool
**Default:** `False`
Expand Down Expand Up @@ -1003,18 +1001,44 @@ Combines all the bare straight imports of the same section in a single line. Won
**Python & Config File Name:** namespace_packages
**CLI Flags:** **Not Supported**

## Check
## Follow Links

Checks the file for unsorted / unformatted imports and prints them to the command line without modifying the file. Returns 0 when nothing would change and returns 1 when the file would be reformatted.
**No Description**

**Type:** Bool
**Default:** `True`
**Python & Config File Name:** follow_links
**CLI Flags:** **Not Supported**

## Show Version

Displays the currently installed version of isort.

**Type:** Bool
**Default:** `False`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- -c
- --check-only
- --check
- -V
- --version

**Examples:**

### Example cli usage

`isort --version`

## Version Number

Returns just the current version number without the logo

**Type:** String
**Default:** `==SUPPRESS==`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- --vn
- --version-number

## Write To Stdout

Expand All @@ -1028,44 +1052,52 @@ Force resulting output to stdout, instead of in-place.
- -d
- --stdout

## Show Diff
## Show Config

Prints a diff of all the changes isort would make to a file, instead of changing it in place
See isort's determined config, as well as sources of config options.

**Type:** Bool
**Default:** `False`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- --df
- --diff
- --show-config

## Jobs
## Show Files

Number of files to process in parallel.
See the files isort will be ran against with the current config options.

**Type:** Int
**Default:** `None`
**Type:** Bool
**Default:** `False`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- -j
- --jobs
- --show-files

## Dont Order By Type
## Show Diff

Don't order imports by type, which is determined by case, in addition to alphabetically.
Prints a diff of all the changes isort would make to a file, instead of changing it in place

**NOTE**: type here refers to the implied type from the import name capitalization.
isort does not do type introspection for the imports. These "types" are simply: CONSTANT_VARIABLE, CamelCaseClass, variable_or_function. If your project follows PEP8 or a related coding standard and has many imports this is a good default. You can turn this on from the CLI using `--order-by-type`.
**Type:** Bool
**Default:** `False`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- --df
- --diff

## Check

Checks the file for unsorted / unformatted imports and prints them to the command line without modifying the file. Returns 0 when nothing would change and returns 1 when the file would be reformatted.

**Type:** Bool
**Default:** `False`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- --dt
- --dont-order-by-type
- -c
- --check-only
- --check

## Settings Path

Expand All @@ -1081,35 +1113,28 @@ Explicitly set the settings path or file instead of auto determining based on fi
- --settings-file
- --settings

## Show Version
## Jobs

Displays the currently installed version of isort.
Number of files to process in parallel.

**Type:** Bool
**Default:** `False`
**Type:** Int
**Default:** `None`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- -V
- --version

**Examples:**

### Example cli usage

`isort --version`
- -j
- --jobs

## Version Number
## Ask To Apply

Returns just the current version number without the logo
Tells isort to apply changes interactively.

**Type:** String
**Default:** `==SUPPRESS==`
**Type:** Bool
**Default:** `False`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- --vn
- --version-number
- --interactive

## Files

Expand All @@ -1122,38 +1147,53 @@ One or more Python source files that need their imports sorted.

-

## Ask To Apply
## Dont Follow Links

Tells isort to apply changes interactively.
Tells isort not to follow symlinks that are encountered when running recursively.

**Type:** Bool
**Default:** `False`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- --interactive
- --dont-follow-links

## Show Config
## Filename

See isort's determined config, as well as sources of config options.
Provide the filename associated with a stream.

**Type:** Bool
**Default:** `False`
**Type:** String
**Default:** `None`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- --show-config
- --filename

## Show Files
## Dont Order By Type

See the files isort will be ran against with the current config options.
Don't order imports by type, which is determined by case, in addition to alphabetically.

**NOTE**: type here refers to the implied type from the import name capitalization.
isort does not do type introspection for the imports. These "types" are simply: CONSTANT_VARIABLE, CamelCaseClass, variable_or_function. If your project follows PEP8 or a related coding standard and has many imports this is a good default. You can turn this on from the CLI using `--order-by-type`.

**Type:** Bool
**Default:** `False`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- --show-files
- --dt
- --dont-order-by-type

## Ext Format

Tells isort to format the given files according to an extensions formatting rules.

**Type:** String
**Default:** `None`
**Python & Config File Name:** **Not Supported**
**CLI Flags:**

- --ext-format

## Deprecated Flags

Expand Down

0 comments on commit 35f2f8f

Please sign in to comment.