-
-
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
Add missing http.client
globals and make all of them literal
#13255
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
BTW, FYI the order of those globals follows exactly the order of which they are originally defined in the enum @ typeshed/stdlib/http/__init__.pyi Lines 17 to 87 in 54e1c6a
I also assumed the stub is up-to-date with the source, but I'll make sure later. Also, I think it's reasonable to add a comment like "keep in sync with the |
If a runtime module explicitly defines |
89e76ce
to
6a6f9ae
Compare
While checking against the upstream of stdlib, I decided to reorder and reformat both the enum members and the annotated constants to follow exactly the order and format from there. |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Generated with https://gist.github.com/bswck/4b41f8329f602ef7d92e65a8721ec9ae (against typeshed upstream), so I'm pretty sure it doesn't annotate any codes incorrectly.
I discussed the idea of turning these global
int
s toLiteral
s with @JelleZijlstra.What's left to do is examine why
stubtest
allegedly reported no issues with the previous version of thehttp/client.pyi
stub that lacked some constants from runtime.That's what I'll investigate tomorrow.