nice-florist-55958
03/18/2022, 11:16 PMisort 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.happy-kitchen-89482
03/19/2022, 2:00 AMhappy-kitchen-89482
03/19/2022, 2:01 AMhappy-kitchen-89482
03/19/2022, 2:01 AMnice-florist-55958
03/21/2022, 2:24 AMhappy-kitchen-89482
03/21/2022, 3:50 PM