It appears that isort uses available libraries to determine whether a library is third-party or not. When bob is not installed, it produces:
When bob is installed, it produces:
This non-determinism is very undesired. A python project may have some optional dependencies that's only required by some of its files. Different developers of such project may not have the same dependencies installed and therefore get different outputs by isort. This makes it impossible to use isort as a mandatory linter or pre-commit hooks.
It appears that
isortuses available libraries to determine whether a library is third-party or not. Whenbobis not installed, it produces:When
bobis installed, it produces:This non-determinism is very undesired. A python project may have some optional dependencies that's only required by some of its files. Different developers of such project may not have the same dependencies installed and therefore get different outputs by
isort. This makes it impossible to useisortas a mandatory linter or pre-commit hooks.