Skip to content

third party libs not identified when running via tox #704

@csala

Description

@csala

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions