summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Brown II <Stephen.Brown2@gmail.com>2020-01-15 16:11:11 -0700
committerStephen Brown II <Stephen.Brown2@gmail.com>2020-01-15 16:11:11 -0700
commit6cc047e13719e4cf70c4f65711817acacb96c0fb (patch)
tree21ca3209b9c675b3833c27a059cba6794c1ee651
parent63067802cedb570b50008517c688825bb1e27d56 (diff)
downloadisort-6cc047e13719e4cf70c4f65711817acacb96c0fb.tar.gz
Add --ensure-newline-before-comments argument
-rw-r--r--isort/main.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/isort/main.py b/isort/main.py
index ca94c4ac..de3dfda3 100644
--- a/isort/main.py
+++ b/isort/main.py
@@ -277,6 +277,13 @@ def parse_args(argv: Optional[Sequence[str]] = None) -> Dict[str, Any]:
help="Multi line output (0-grid, 1-vertical, 2-hanging, 3-vert-hanging, 4-vert-grid, "
"5-vert-grid-grouped, 6-vert-grid-grouped-no-comma).",
)
+ parser.add_argument(
+ "-n",
+ "--ensure-newline-before-comments",
+ dest="ensure_newline_before_comments",
+ action="store_true",
+ help="Inserts a blank line before a comment following an import.",
+ )
inline_args_group.add_argument(
"--nis",
"--no-inline-sort",