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

Final allows redefinition if another final statement is used. #13076

Closed
JulesGM opened this issue Jul 5, 2022 · 1 comment
Closed

Final allows redefinition if another final statement is used. #13076

JulesGM opened this issue Jul 5, 2022 · 1 comment
Labels
bug mypy got something wrong topic-final PEP 591

Comments

@JulesGM
Copy link

JulesGM commented Jul 5, 2022

mypy 0.961 (compiled: yes)

a: Final[int] = 123
a: Final[int] = 321

doesn't cause an error.
I would have expected it to fail like

a: Final[int] = 123
a: int = 321

Is this done on purpose?

@JulesGM JulesGM added the bug mypy got something wrong label Jul 5, 2022
@AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood added the topic-final PEP 591 label Jul 5, 2022
@hauntsaninja hauntsaninja closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-final PEP 591
Projects
None yet
Development

No branches or pull requests

3 participants