Skip to content

[good first issue][BUG] Wrong type annotations in PythonPathPackageWithDeps.__init__() #3607

@webknjaz

Description

@webknjaz

I've hit this while looking into the plugins API and needed to extract some env deps.

Apparently, https://github.com/tox-dev/tox/blob/5e0784a/src/tox/tox_env/python/package.py#L33 claims that the PythonPathPackageWithDeps.deps attribute is a sequence of packages. But in reality, in runtime, it's a list of requirements. Also, the deps argument to the initializer gets a list of requirements too.

The correct argument signature would be deps: Sequence[Requirement] and the attribute assignment does not need to re-define it to something else to fool MyPy.

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