Skip to content

Commit 5a9ad09

Browse files
hirak99DanielNoord
authored andcommitted
Add CLI Flag for --forced-separate
Implements #2366
1 parent 9f1be49 commit 5a9ad09

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
@@ -503,6 +503,14 @@ def _build_arg_parser() -> argparse.ArgumentParser:
503503
"to be grid wrapped regardless of line "
504504
"length. If 0 is passed in (the global default) only line length is considered.",
505505
)
506+
output_group.add_argument(
507+
"--fs",
508+
"--forced-separate",
509+
dest="forced_separate",
510+
action="append",
511+
help="Force specified sub modules to show separately. To specify multiple modules, "
512+
"use the argument multiple times: --forced-separate typing --forced-separate six.",
513+
)
506514
output_group.add_argument(
507515
"-i",
508516
"--indent",

0 commit comments

Comments
 (0)