Skip to content

Commit

Permalink
Add config option for reversing sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Mar 17, 2021
1 parent 9042488 commit d4907b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions isort/main.py
Expand Up @@ -562,6 +562,12 @@ def _build_arg_parser() -> argparse.ArgumentParser:
action="store_true",
help="Reverse order of relative imports.",
)
output_group.add_argument(
"--reverse-sort",
dest="reverse_sort",
action="store_true",
help="Reverses the ordering of imports.",
)
inline_args_group.add_argument(
"--sl",
"--force-single-line-imports",
Expand Down
1 change: 1 addition & 0 deletions isort/settings.py
Expand Up @@ -210,6 +210,7 @@ class _Config:
honor_case_in_force_sorted_sections: bool = False
sort_relative_in_force_sorted_sections: bool = False
overwrite_in_place: bool = False
reverse_sort: bool = False

def __post_init__(self):
py_version = self.py_version
Expand Down

0 comments on commit d4907b9

Please sign in to comment.