-
-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect third vs first party categorization - namespace packages #1443
Incorrect third vs first party categorization - namespace packages #1443
Comments
Thanks for reporting this issue! This is an embarrassing omission on my part. I had hoped to get a fix for this out in for 5.5.0, but I don't want to rush the change while pushing out some changes needed for improved VSCode integration. Expect to see this fixed in the next minor release (5.6.0) Thanks! ~Timothy |
I think this is happening to us too #1467 |
@timothycrosley any ETA on this? |
@gaborbernat the next minor release is scheduled for October 1st, I'll try to make sure the change is in develop soon so that you and others can test the new functionality before it's released to PyPI |
This is fixed in develop and, void of issues being discovered before then, will be deployed with the 5.6.0 release of isort tonight. The solution as coded exposes two new configuration options to tweak the behaviour if needed:
Thanks! ~Timothy |
Was this released part of 5.5.5 and just msised from the changelog? 🤔 |
@gaborbernat nope! There will be another release tonight, but since it is rather large for a minor release I wanted to make sure that the one major issue in the 5.5.x series was released separately in case any of the changes in 5.6.0 are harder to accommodate by any individual projects |
This is now live with release 5.6.0 of isort https://pycqa.github.io/isort/CHANGELOG/#560-october-7-2020. I apologize for the extended timeline for the release, but hope there are enough good things in it to make up for it! |
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
toroot.a
will mean thatroot.b
will also be categorized as first party even though it's third party:The text was updated successfully, but these errors were encountered: