Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stubs/gunicorn/gunicorn/_types.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ _StatusType: TypeAlias = str
_HeadersType: TypeAlias = Iterable[tuple[str, str]]

_EnvironType: TypeAlias = MutableMapping[str, Any] # See https://peps.python.org/pep-0333/

class _StartResponseType(Protocol):
def __call__(
self, status: _StatusType, headers: _HeadersType, exc_info: OptExcInfo | None = ..., /
Expand Down
5 changes: 4 additions & 1 deletion stubs/gunicorn/gunicorn/debug.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@

def __init__(self, trace_names: Container[str] | None = None, show_values: bool = True) -> None: ...
def __call__(
self, frame: FrameType, event: Literal["call", "line", "return", "exception", "opcode"], arg: Any # `arg` is not used inside the function, stub is set Any
self,
frame: FrameType,
event: Literal[call, line, "return", exception, opcode],

Check failure on line 16 in stubs/gunicorn/gunicorn/debug.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

"opcode" is not defined (reportUndefinedVariable)

Check failure on line 16 in stubs/gunicorn/gunicorn/debug.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

"exception" is not defined (reportUndefinedVariable)

Check failure on line 16 in stubs/gunicorn/gunicorn/debug.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

Expected expression

Check failure on line 16 in stubs/gunicorn/gunicorn/debug.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

"line" is not defined (reportUndefinedVariable)

Check failure on line 16 in stubs/gunicorn/gunicorn/debug.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

"call" is not defined (reportUndefinedVariable)

Check failure on line 16 in stubs/gunicorn/gunicorn/debug.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

"Literal" is not defined (reportUndefinedVariable)
arg: Any, # `arg` is not used inside the function, stub is set Any
) -> Self: ...

def spew(trace_names: Container[str] | None = None, show_values: bool = False) -> None: ...
Expand Down
6 changes: 3 additions & 3 deletions stubs/gunicorn/gunicorn/util.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from _typeshed import FileDescriptorLike, FileDescriptorOrPath, HasFileno, StrOrBytesPath
from inspect import _IntrospectableCallable, _ParameterKind
from socket import socket
from typing import Any, Literal, NoReturn
from typing import Literal, NoReturn
from urllib.parse import SplitResult

from ._types import _AddressType, _WSGIAppType
Expand All @@ -12,8 +12,8 @@

def load_entry_point(distribution: str, group: str, name: str) -> type[object]: ...
def load_class(
uri: str | type[Logger] | type[SyncWorker], default: str = "gunicorn.workers.sync.SyncWorker", section: str = "gunicorn.workers"
) -> type[Logger] | type[SyncWorker]: ...
uri: type[Logger | SyncWorker] | str, default: str = "gunicorn.workers.sync.SyncWorker", section: str = "gunicorn.workers"

Check failure on line 15 in stubs/gunicorn/gunicorn/util.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

"SyncWorker" is not defined (reportUndefinedVariable)

Check failure on line 15 in stubs/gunicorn/gunicorn/util.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

"Logger" is not defined (reportUndefinedVariable)
) -> type[Logger | SyncWorker]: ...

Check failure on line 16 in stubs/gunicorn/gunicorn/util.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

"SyncWorker" is not defined (reportUndefinedVariable)

Check failure on line 16 in stubs/gunicorn/gunicorn/util.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

"Logger" is not defined (reportUndefinedVariable)

positionals: tuple[Literal[_ParameterKind.POSITIONAL_ONLY], Literal[_ParameterKind.POSITIONAL_OR_KEYWORD]]

Expand Down
1 change: 0 additions & 1 deletion stubs/gunicorn/gunicorn/workers/ggevent.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from contextlib import AbstractAsyncContextManager

from types import FrameType
from typing import Any, ClassVar

Expand Down
Loading