Skip to content

Commit

Permalink
Add CLI Flag for --forced-separate
Browse files Browse the repository at this point in the history
Implements PyCQA#2366
  • Loading branch information
hirak99 committed Feb 18, 2025
1 parent a255775 commit ca59842
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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

0 comments on commit ca59842

Please sign in to comment.