Skip to content

It's impossible to use --warn-unused-ignores in a Python 2+3 codebase #2961

Closed
@timabbott

Description

@timabbott

If you use Python 2 and Python 3 in a codebase, and run mypy against it with both, --warn-unused-ignores will warn about issues present in only one or the other.

A reasonable fix might be to add a type: ignore2 / type: ignore3 that one can use in this sort of situation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions