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
I have added two lines to tests/unit/test_place.py to show the confusion.
In that test, the src_path is set to /home/layus/projects/isort_github_repo/isort (on my machine obviously) and contains the deprecated subfolder. (src_path is the isort folder in this repo).
I would expect this src_path to report either the isort module or the deprecated module to be THIRDPARTY. But they are all reported as FIRSTPARTY.
That is why I think that src_path should have stricter semantics. For my purposes I would prefer to never accept src_path / "__init__.py" as a valid src_path.name module, but I can see the convenience of specifying modules directly instead of their parent directory.
It is easy to switch from one semantics to the other using 'src_path/*orsrc_path.parent`.
I believe this is the confusion behind #1696, #2247 and #2247.
I can patch it, but I need some decision on the desired behavior.
I have added two lines to
tests/unit/test_place.py
to show the confusion.In that test, the src_path is set to
/home/layus/projects/isort_github_repo/isort
(on my machine obviously) and contains thedeprecated
subfolder. (src_path is the isort folder in this repo).I would expect this src_path to report either the
isort
module or thedeprecated
module to be THIRDPARTY. But they are all reported as FIRSTPARTY.That is why I think that src_path should have stricter semantics. For my purposes I would prefer to never accept
src_path / "__init__.py"
as a validsrc_path.name
module, but I can see the convenience of specifying modules directly instead of their parent directory.It is easy to switch from one semantics to the other using 'src_path/*
or
src_path.parent`.I believe this is the confusion behind #1696, #2247 and #2247.
I can patch it, but I need some decision on the desired behavior.
test result:
The text was updated successfully, but these errors were encountered: