Skip to content

Request: opt-in rule preventing duplicate error codes #16885

@jamesbraza

Description

@jamesbraza
Contributor

Feature

If one specifies an error code twice, mypy allows it:

foo = 1
foo = "hi"  # type: ignore[assignment,assignment]

Pitch

Can we add an opt-in rule to have mypy disallow duplicate error codes?

Activity

changed the title [-]Opt-in rule preventing duplicate error codes[/-] [+]Request: opt-in rule preventing duplicate error codes[/+] on Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jamesbraza@hauntsaninja@AlexWaygood

        Issue actions

          Request: opt-in rule preventing duplicate error codes · Issue #16885 · python/mypy