-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add stubs for gunicorn #14690
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
base: main
Are you sure you want to change the base?
Add stubs for gunicorn #14690
Conversation
This comment has been minimized.
This comment has been minimized.
81ea5b0
to
10c1e83
Compare
10c1e83
to
71121bc
Compare
This comment has been minimized.
This comment has been minimized.
If possible, please tell me how to correctly import library components without stubs.
But I understand that it doesn't look nice. |
Unfortunately you can't. You can can replace these with placeholder types (good choices are an |
This comment has been minimized.
This comment has been minimized.
@brianschubert Done! |
Diff from mypy_primer, showing the effect of this PR on open source code: aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/worker.py:38: error: Unused "type: ignore[misc, no-any-unimported]" comment [unused-ignore]
+ aiohttp/worker.py:71:13: error: Statement is unreachable [unreachable]
+ aiohttp/worker.py:71:13: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-unreachable for more info
+ aiohttp/worker.py:75:26: error: Too few arguments [call-arg]
+ aiohttp/worker.py:75:26: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info
+ aiohttp/worker.py:75:26: note: "wsgi" is considered instance variable, to make it class variable use ClassVar[...]
+ aiohttp/worker.py:117: error: Unused "type: ignore" comment [unused-ignore]
|
Source: https://github.com/benoitc/gunicorn
PyPi: https://pypi.org/project/gunicorn/
Issue: benoitc/gunicorn#1393