Isort is doing a good job when running directly, but it fails to identify third party libs when running through tox.
These are the relevant bits of my tox.ini:
[testenv:lint]
skipsdist = true
skip_install = true
deps =
flake8
isort
commands =
flake8 my_app tests examples
isort -c --recursive my_app tests examples
And setup.cfg:
[isort]
include_trailing_comment = True
known_first_party = my_app
# known_third_party = a_dependency, another_dependency
line_length = 99
lines_between_types = 0
multi_line_output = 4
not_skip = __init__.py
use_parentheses = True
I have seen this behavior in the past, and I know that uncommenting the known_third_party line resolves the issue, but it only does if I add there ALL my third party imports, which might be a long list.
Is this really the expected behavior, or is there something which I can configure differently to make this problem go away?
Isort is doing a good job when running directly, but it fails to identify third party libs when running through tox.
These are the relevant bits of my
tox.ini:And
setup.cfg:I have seen this behavior in the past, and I know that uncommenting the
known_third_partyline resolves the issue, but it only does if I add there ALL my third party imports, which might be a long list.Is this really the expected behavior, or is there something which I can configure differently to make this problem go away?