-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Typecheck typeshed's code with pyright #9793
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
Conversation
This comment has been minimized.
This comment has been minimized.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
AlexWaygood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with everything Jelle said; here's a few more pieces of feedback
…m/typeshed into pyright-typecheck-typeshed
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
…m/typeshed into pyright-typecheck-typeshed
|
Thanks for the reviews and patience! This started absolutely huge that I split off in its own chunks over time. And there was some artefacts of that leftover. |
When it comes to typeshed's own code, it is tested with mypy but not with pyright. A bit odd given how strictly the stubs are tested against pyright. Making typeshed, imo, a bit of a "poorly shod shoemaker" on that aspect.
Pyright specifically complements mypy's missing features well.
But this is not just about typeshed itself. As it is a pillar in Python's typing ecosystem, problems caught by it, and improvements made thanks to it (especially those pushing the limitations of the current type system) have bigger repercussions on the ecosystem as a whole.
Tangible improvements:
All of the PRs and issues mentioned here are directly related, and opened due, to me trying to run pyright on typeshed's own code and working on this PR:
# pyright: ignorenot at the start of a comment microsoft/pyright#4259pyright: ignorecomments, but nottype: ignore? microsoft/pyright#4243Unknownwhen in tuple passed to Iterable with TypeVar parameter microsoft/pyright#4244typing_extension.Selfinfers the wrong type from__new__microsoft/pyright#4668.pychanges in this PRldap3#9532 (comment)pyrightconfig.json, add missing comments and extra strict settings in all pyright configs #9714pyright: ignoreand differentiate from mypy ignores #9397dict.getoverload with default value not be generic? #9155termcolor.coloredfallback #9435Loaderparameter inPyYAML/yaml#9752py.typedmarker cpburnz/python-pathspec#67PathLiketype cpburnz/python-pathspec#75# pyright: ignore[]used with# type: ignore[]comments on short lines psf/black#3399IOpython-poetry/tomlkit#272(I waited until most of these got resolved before bringing this PR)