-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Mark enum constants in signal.py
as Final
, not Literal
#13500
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
The change basically LGTM, but pytype is crashing. Also, pyright has quite different inference for generic parameters compared to mypy, so I think we'll struggle to find a test case test demonstrates the issue clearly while passing on both mypy and pyright. I'd be tempted to just skip the test case, personally. |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Any ideas on what's wrong?
|
looks like a pytype bug to me |
cc @rchen152 |
I don't work on pytype anymore, either. Maybe @h-joo? |
Oh, sorry! |
PR #13336 caused a regression in mypy, see python/mypy#18628
So, I changed
Literal
toFinal
, since it works and added a test case for the regression.