diff --git a/isort/main.py b/isort/main.py index 5ed22cc26..d16626f5f 100644 --- a/isort/main.py +++ b/isort/main.py @@ -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", diff --git a/isort/settings.py b/isort/settings.py index a62c27bf6..dc3754ef8 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -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