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
Firstly thanks for isort, I've incorporated it into my projects recently and it's great!
I've noticed some subtleties in how imports are classified, particularly for imports that should be treated as first-party but may be picked up as third-party depending on the working directory and configuration (e.g. #1497).
I'd find it really helpful if the documentation had a "cheat sheet" on the rules/conditions that lead to an import being classified as FUTURE / STDLIB / THIRDPARTY / FIRSTPARTY / LOCALFOLDER (especially first party as mentioned), and if relevant how these can be configured (e.g. with known first-party or similar). Apologies if this already exists but I've struggled to find it.
The specific case that's left me scratching my head is running isort --verbose --check-only broken.py from this directory in this repo detects mypackage as third-party rather than first-party. However, if I set up a simple example elsewhere then it seems to get correctly identified as first-party as long as isort is run in the same directory. So I think there's something about the config/file structure of that linked repo which causes a different result.
The text was updated successfully, but these errors were encountered:
Firstly thanks for
isort
, I've incorporated it into my projects recently and it's great!I've noticed some subtleties in how imports are classified, particularly for imports that should be treated as first-party but may be picked up as third-party depending on the working directory and configuration (e.g. #1497).
I'd find it really helpful if the documentation had a "cheat sheet" on the rules/conditions that lead to an import being classified as
FUTURE
/STDLIB
/THIRDPARTY
/FIRSTPARTY
/LOCALFOLDER
(especially first party as mentioned), and if relevant how these can be configured (e.g. with known first-party or similar). Apologies if this already exists but I've struggled to find it.The specific case that's left me scratching my head is running
isort --verbose --check-only broken.py
from this directory in this repo detectsmypackage
as third-party rather than first-party. However, if I set up a simple example elsewhere then it seems to get correctly identified as first-party as long asisort
is run in the same directory. So I think there's something about the config/file structure of that linked repo which causes a different result.The text was updated successfully, but these errors were encountered: