Skip to content

Commit

Permalink
Bugfix #1375: --dont-order-by-type broken
Browse files Browse the repository at this point in the history
  • Loading branch information
sztamas committed Aug 12, 2020
1 parent 65f9e94 commit 680c92b
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 680c92b

Please sign in to comment.