Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jamesbraza opened this issue Feb 6, 2024 · 0 comments
Open

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

jamesbraza opened this issue Feb 6, 2024 · 0 comments

Comments

@jamesbraza
Copy link
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?

@jamesbraza jamesbraza changed the title Opt-in rule preventing duplicate error codes Request: opt-in rule preventing duplicate error codes Feb 6, 2024
@AlexWaygood AlexWaygood added the topic-type-ignore # type: ignore comments label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants