-
-
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
stdlib: add defaults #9501
stdlib: add defaults #9501
Conversation
To keep this PR manageable, I'm going to fix any issues in CI by just reverting the affected functions. Notes on CI:
|
We also got a pytype crash
I suspect like flake8-pyi it's something to do with treating string defaults as annotations but I'll have to look at the code. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just checking, you ran latest stubtest locally with the default checking you added? |
Not yet, I forgot it hadn't been released yet. |
We've often used pre-release stubtest in CI. Might be a good idea to do that now too! |
For reference fdc5863 is where we undid stubtest-from-master most recently, but some of the infra has changed since then so it's not just a matter of reverting and updating the commit. |
a266e19
to
1cff810
Compare
This comment has been minimized.
This comment has been minimized.
The runtime defaults are None. Found in python#9501.
This comment has been minimized.
This comment has been minimized.
The runtime defaults are None. Found in #9501.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
See python/typeshed#9501. Resolves #1350 PiperOrigin-RevId: 501717379
See python/typeshed#9501. Resolves #1350 PiperOrigin-RevId: 501717379
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
New version with the latest stubdefaulter:
The PR currently doesn't include a change to the version of stubtest. If we want to run stubtest from mypy master, I'd rather do that in a separate PR. |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.
A quick glance shows no obvious problems. But I mostly rely on our tests here.
Continuing work towards #8988. The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are: - Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine) - Defaults in non-py311 branches - Defaults for float parameters - Defaults for overloads
Continuing work towards python#8988. The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in python#9501 are: - Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine) - Defaults in non-py311 branches - Defaults for float parameters - Defaults for overloads
Ran https://github.com/JelleZijlstra/stubdefaulter on the stdlib