Skip to content

Commit 83585e6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent 0394026 commit 83585e6

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

stubs/gunicorn/gunicorn/_types.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _StatusType: TypeAlias = str
88
_HeadersType: TypeAlias = Iterable[tuple[str, str]]
99

1010
_EnvironType: TypeAlias = MutableMapping[str, Any] # See https://peps.python.org/pep-0333/
11+
1112
class _StartResponseType(Protocol):
1213
def __call__(
1314
self, status: _StatusType, headers: _HeadersType, exc_info: OptExcInfo | None = ..., /

stubs/gunicorn/gunicorn/debug.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ class Spew:
1111

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

1720
def spew(trace_names: Container[str] | None = None, show_values: bool = False) -> None: ...

stubs/gunicorn/gunicorn/util.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import types
22
from _typeshed import FileDescriptorLike, FileDescriptorOrPath, HasFileno, StrOrBytesPath
33
from inspect import _IntrospectableCallable, _ParameterKind
44
from socket import socket
5-
from typing import Any, Literal, NoReturn
5+
from typing import Literal, NoReturn
66
from urllib.parse import SplitResult
77

88
from ._types import _AddressType, _WSGIAppType
@@ -12,8 +12,8 @@ hop_headers: set[str]
1212

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

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

stubs/gunicorn/gunicorn/workers/ggevent.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from contextlib import AbstractAsyncContextManager
2-
32
from types import FrameType
43
from typing import Any, ClassVar
54

0 commit comments

Comments
 (0)