Skip to content
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

Third-party incorrectly identify as First-party depending on the name of the root directory #2240

Open
pvanderlinden opened this issue Feb 27, 2024 · 0 comments

Comments

@pvanderlinden
Copy link

Third-party packages are incorrectly identify as First-party depending on the name of the root directory. I can't find a setting to override this behaviour. Example:

tree:

some_name
|-package_name
|--__init__.py
|--file1.py
|-tests
|-docs
|-pyproject.toml

What isort thinks it should be:

import datetime

import third_party

from package_name.file1 import xyz
from some_name import xyz

What it should be:

import datetime

import third_party
from some_name import xyz

from package_name.file1 import xyz

If I rename the root directory (some_name -> some_other_name), but this means for the CI run I have to also rename the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant