-
-
Notifications
You must be signed in to change notification settings - Fork 574
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
strange order changes using pkgutils namespace packages #1879
Comments
Hi! So sorry you ran into this corner case! Older versions of Python didn't have implicit namespace package support, which allows namespaces to be created in a way that's statically checkable with code parsers, however there was still fairly strict requirements on what command is called to make it a namespace package for these older versions, which is what isort checks (since it can't look at the env etc.) This is fairly simple logic which lives here: Line 113 in c2ca2e2
You can add the namespace to I hope this is helpful! Thanks, ~Timothy |
Thanks a lot @timothycrosley for your answer and explanation. Adding Feel free to close the issue or leave it open as a reminder for a possible improvement. fin swimmer |
Hello,
at poetry we are
isort
to sort our imports.A contributor now stumble upon a strange behavior of isort. The PR is located here: python-poetry/poetry#4985
In our
__init__.py
in the root folder we have this:The PR changed it to:
See: https://github.com/python-poetry/poetry/pull/4985/files#diff-796398bc03bf8ac0368aba22f7416c9948776a4a666e779700f08bd532c27249
Now all imports of
poetry.core
(which is separate namespace package) are sorted to a different place, e.g.:becomes
To be honest I'm not sure which sorting is the expected one. But I would expect, that the line breaks in the above code, shouldn't change any sorts by
isort
.Any ideas what's going on?
Thanks a lot.
fin swimmer
The text was updated successfully, but these errors were encountered: