Skip to content

sort_reexports breaks __all__ symbol #1887

Closed
@jugmac00

Description

repro

  • install isort from current head ( c6a4196 )
  • create test.py with one line __all__ = ["b", "c", "a"]
  • create either config file with sort_reexports = true and run isort test.py or run isort --sort_reexports test.py

The above line in test.py will be changed into...

___all__ = ["a", "b", "c"]

Please note the third underline character at the beginning of the symbol.

Python 3.8.10 on Ubuntu 20.04

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions