I have the following directory structure:
.
├── a
│ ├── __init__.py
│ ├── numpy.py
│ └── test.py
├── b
│ └── test.py
└── pyproject.toml
with the following pyproject.toml (isort config):
[tool.isort]
profile = "hug"
src_paths = ["a"]
known_first_party = [
"a",
]
All the files are empty except b.test.py.
b.test.py sorted by isort
from a.test import *
from numpy import array
b.test.py sorted by isort if I rename the sub-module to say numpyi.py (that is, a.numpyi.py)
from numpy import array
from a.test import *
If I explicitly mark numpy as third-party then everything works well. Is this intentional? I would expect the latter output to be the default one, that is, isort should not treat the numpy import as a local import.
I have the following directory structure:
with the following pyproject.toml (isort config):
All the files are empty except
b.test.py.b.test.py sorted by isort
b.test.py sorted by isort if I rename the sub-module to say
numpyi.py(that is,a.numpyi.py)If I explicitly mark
numpyas third-party then everything works well. Is this intentional? I would expect the latter output to be the default one, that is,isortshould not treat thenumpyimport as a local import.