Skip to content

Commit

Permalink
Fix CLI documentation for filter files.
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Jul 29, 2020
1 parent e934ad3 commit 0b26361
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[settings]
profile=hug
src_paths=isort,test
skip=tests/example_crlf_file.py
skip=tests/example_crlf_file.py,migrations
57 changes: 44 additions & 13 deletions docs/configuration/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@ Force isort to recognize a module as being part of the current python project.
- -p
- --project

## Known Local Folder

Force isort to recognize a module as being a local folder. Generally, this is reserved for relative imports (from . import module).

**Type:** Frozenset
**Default:** `frozenset()`
**Python & Config File Name:** known_local_folder
**CLI Flags:**

- --known-local-folder

## Known Standard Library

Force isort to recognize a module as part of Python's standard library.
Expand Down Expand Up @@ -719,7 +730,7 @@ Inserts a blank line before a comment following an import.

## Profile

Base profile type to use for configuration.
Base profile type to use for configuration. Profiles include: black, django, pycharm, google, open_stack, plone, attrs, hug. As well as any shared profiles.

**Type:** String
**Default:** ``
Expand Down Expand Up @@ -787,7 +798,7 @@ Causes all non indented imports to float to the top of the file having its impor

## Filter Files

Tells isort to filter files even when they are explicitly passed in as part of the CLI command. Note that while this can be set as part of the config file it only affects CLI operation.
Tells isort to filter files even when they are explicitly passed in as part of the CLI command.

**Type:** Bool
**Default:** `False`
Expand All @@ -796,6 +807,37 @@ Tells isort to filter files even when they are explicitly passed in as part of t

- --filter-files

## Formatter

Specifies the name of a formatting plugin to use when producing output.

**Type:** String
**Default:** ``
**Python & Config File Name:** formatter
**CLI Flags:**

- --formatter

## Formatting Function

**No Description**

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

## Color Output

Tells isort to use color in terminal output.

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

- --color

## Check

Checks the file for unsorted / unformatted imports and prints them to the command line without modifying the file.
Expand Down Expand Up @@ -937,17 +979,6 @@ See isort's determined config, as well as sources of config options.

- --show-config

## Color Terminal Output

Tells isort to use color in terminal output.

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

- --color

## Deprecated Flags

==SUPPRESS==
Expand Down
3 changes: 1 addition & 2 deletions isort/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,7 @@ def _build_arg_parser() -> argparse.ArgumentParser:
dest="filter_files",
action="store_true",
help="Tells isort to filter files even when they are explicitly passed in as "
"part of the CLI command. Note that while this can be set as part of the config file it "
"only affects CLI operation.",
"part of the CLI command."
)
parser.add_argument(
"files", nargs="*", help="One or more Python source files that need their imports sorted."
Expand Down

0 comments on commit 0b26361

Please sign in to comment.