Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI Flag for --forced-separate #2367

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/configuration/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,10 @@ Force certain sub modules to show separately
**Default:** `()`
**Config default:** `[]`
**Python & Config File Name:** forced_separate
**CLI Flags:** **Not Supported**
**CLI Flags:**

- --fs
- --forced-separate

**Examples:**

Expand Down
8 changes: 8 additions & 0 deletions isort/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,14 @@ def _build_arg_parser() -> argparse.ArgumentParser:
"to be grid wrapped regardless of line "
"length. If 0 is passed in (the global default) only line length is considered.",
)
output_group.add_argument(
"--fs",
"--forced-separate",
dest="forced_separate",
action="append",
help="Force specified sub modules to show separately. To specify multiple modules, "
"use the argument multiple times: --forced-separate typing --forced-separate six.",
)
output_group.add_argument(
"-i",
"--indent",
Expand Down