Skip to content

Commit ca59842

Browse files
committed
Add CLI Flag for --forced-separate
Implements #2366
1 parent a255775 commit ca59842

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

docs/configuration/options.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,10 @@ Force certain sub modules to show separately
499499
**Default:** `()`
500500
**Config default:** `[]`
501501
**Python & Config File Name:** forced_separate
502-
**CLI Flags:** **Not Supported**
502+
**CLI Flags:**
503+
504+
- --fs
505+
- --forced-separate
503506

504507
**Examples:**
505508

isort/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,14 @@ def _build_arg_parser() -> argparse.ArgumentParser:
502502
"to be grid wrapped regardless of line "
503503
"length. If 0 is passed in (the global default) only line length is considered.",
504504
)
505+
output_group.add_argument(
506+
"--fs",
507+
"--forced-separate",
508+
dest="forced_separate",
509+
action="append",
510+
help="Force specified sub modules to show separately. To specify multiple modules, "
511+
"use the argument multiple times: --forced-separate typing --forced-separate six.",
512+
)
505513
output_group.add_argument(
506514
"-i",
507515
"--indent",

0 commit comments

Comments
 (0)