You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://github.com/PyCQA/isort/blob/develop/isort/place.py#L65-L71 only considers the root module name when trying to categorize a package as first party. This causes issues when your project only contains a part of that module (e.g. in case of namespace packages). Setting known_first_party to root.a will mean that root.b will also be categorized as first party even though it's third party:
root
├── __init__.py
├── a
│ └── __init__.py
└── b
└── __init__.py
https://github.com/PyCQA/isort/blob/develop/isort/place.py#L65-L71 only considers the root module name when trying to categorize a package as first party. This causes issues when your project only contains a part of that module (e.g. in case of namespace packages). Setting
known_first_partytoroot.awill mean thatroot.bwill also be categorized as first party even though it's third party: