Skip to content

Commit

Permalink
Merge pull request #1377 from sztamas/issue/1375/dont_order_by_type-b…
Browse files Browse the repository at this point in the history
…roken

Bugfix #1375: --dont-order-by-type broken
  • Loading branch information
timothycrosley committed Aug 13, 2020
2 parents 65f9e94 + 680c92b commit 6fd1592
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions isort/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ def parse_args(argv: Optional[Sequence[str]] = None) -> Dict[str, Any]:
arguments["remapped_deprecated_args"] = remapped_deprecated_args
if "dont_order_by_type" in arguments:
arguments["order_by_type"] = False
del arguments["dont_order_by_type"]
multi_line_output = arguments.get("multi_line_output", None)
if multi_line_output:
if multi_line_output.isdigit():
Expand Down
2 changes: 2 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def test_parse_args():
assert main.parse_args([]) == {}
assert main.parse_args(["--multi-line", "1"]) == {"multi_line_output": WrapModes.VERTICAL}
assert main.parse_args(["--multi-line", "GRID"]) == {"multi_line_output": WrapModes.GRID}
assert main.parse_args(["--dont-order-by-type"]) == {"order_by_type": False}
assert main.parse_args(["--dt"]) == {"order_by_type": False}


def test_ascii_art(capsys):
Expand Down

0 comments on commit 6fd1592

Please sign in to comment.