diff --git a/isort/core.py b/isort/core.py index 46bd77f1..a8e33738 100644 --- a/isort/core.py +++ b/isort/core.py @@ -244,7 +244,7 @@ def process( code_sorting = stripped_line.split("isort: ")[1].strip() code_sorting_indent = line[: -len(line.lstrip())] not_imports = True - elif config.sort_reexports and stripped_line.startswith("__all__"): + elif config.sort_reexports and stripped_line.startswith("__all__") and "isort: skip" not in stripped_line: _, rhs = stripped_line.split("=") code_sorting = LITERAL_TYPE_MAPPING.get(rhs.lstrip()[0], "tuple") code_sorting_indent = line[: -len(line.lstrip())]