-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Run mypy
on cases_generator
#104504
Comments
I think it's useful. |
I don't object, and it may occasionally help. I've come this far mostly by using the VS Code type checker (pylance/pyright) in strict mode, and that has definitely helped me. There are also some annoying bits, in particular lexer.py was written in an overly dynamic style. Maybe it should just be fixed. I'm happy to take PRs. |
Ok then! I will get back to it after the confence I am making is over :) |
mypy
on cases_generator
mypy
on cases_generator
@sobolevn Are you still planning to work on this? Before you go too deep, I expect that the main source of issues is the dynamic nature of lexer.py. We may just have to refactor that to be less introspective. I think it would improve its maintainability. |
Yes, it is still on my TODO list. I can increase the priority :) |
…h-108090) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Now the issue looks to be solved. |
Feature or enhancement
After #104421 is merged, we now have the precedent and the needed infrastructure to run
mypy
on things that support type annotations inTools/
Pitch
Maybe we should run it on
Tools/cases_generator
? It has all annotations in place, it needs very little work. Right nowmypy
finds only 24 errors.Full list:
If @gvanrossum finds it useful, I can surely work on this.
CC @AlexWaygood
Linked PRs
--warn-unreachable
to the mypy config #108112possibly-undefined
error code #108454The text was updated successfully, but these errors were encountered: