Tool `isort` doesn't handle `src_paths` from `.iso...
# general
n
Tool
isort
doesn't handle
src_paths
from
.isort.cfg
correctly. If you have namespaced packages implemented in different parts of the repo, then in order for isort to consider any modules exposed in these namespaces first-party imports, you need to add the paths explicitly in the configuration (https://github.com/PyCQA/isort/issues/1704). When running isort with Pants, this does not work (version 5.10.1):
./pants fmt --only=isort path_to_file_that_imports_firstparty_namespaced_modules
reports isort made no changes, but
isort path_to_file_that_imports_firstparty_namespaced_modules
makes the expected change in grouping. One clue is
isort --show-config
reveals the
src_paths
field to be fully qualified, even though they are only specified relative to the configuration root, whereas the same command ran by Pants shows they're still relative. Pants v2.10rc2.
👀 1
h
Can you open an issue for this at https://github.com/pantsbuild/pants/issues/new/choose ?
That way we can track this properly
Thanks!
n
Certainly.
h
Can you post a link to the issue when you have it? Thanks