-
-
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
@srittau Source code: class NumWorkersChanged(Setting):
def nworkers_changed(server, new_value, old_value):
pass
default = staticmethod(nworkers_changed) The When trying to write stubs: def nworkers_changed(server: Arbiter, new_value: int, old_value: int | None) -> None: ... I get the following error from
How can I properly create a stub so I don't have to write |
…, validate_file_exists
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.
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