Skip to content

Commit 073ec35

Browse files
committed
autofix this
1 parent 83585e6 commit 073ec35

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

stubs/gunicorn/gunicorn/debug.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ __all__ = ["spew", "unspew"]
22

33
from collections.abc import Container
44
from types import FrameType
5-
from typing import Any
5+
from typing import Any, Literal
66
from typing_extensions import Self
77

88
class Spew:
@@ -13,7 +13,7 @@ class Spew:
1313
def __call__(
1414
self,
1515
frame: FrameType,
16-
event: Literal[call, line, "return", exception, opcode],
16+
event: Literal["call"] | Literal["line"] | Literal["return"] | Literal["exception"] | Literal["opcode"],
1717
arg: Any, # `arg` is not used inside the function, stub is set Any
1818
) -> Self: ...
1919

stubs/gunicorn/gunicorn/http/wsgi.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import re
44
import socket
55
from _typeshed import ReadableBuffer
66
from collections.abc import Callable
7-
from typing import Any, Never
7+
from typing import Any
8+
from typing_extensions import Never
89

910
from gunicorn.config import Config
1011
from gunicorn.http import Request

stubs/gunicorn/gunicorn/util.pyi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@ from _typeshed import FileDescriptorLike, FileDescriptorOrPath, HasFileno, StrOr
33
from inspect import _IntrospectableCallable, _ParameterKind
44
from socket import socket
55
from typing import Literal, NoReturn
6+
from typing_extensions import LiteralString
67
from urllib.parse import SplitResult
78

9+
from gunicorn.glogging import Logger
10+
from gunicorn.workers.base import Worker
11+
812
from ._types import _AddressType, _WSGIAppType
913

1014
REDIRECT_TO: str
1115
hop_headers: set[str]
1216

1317
def load_entry_point(distribution: str, group: str, name: str) -> type[object]: ...
1418
def load_class(
15-
uri: type[Logger | SyncWorker] | str, default: str = "gunicorn.workers.sync.SyncWorker", section: str = "gunicorn.workers"
16-
) -> type[Logger | SyncWorker]: ...
19+
uri: type[Logger | Worker] | str, default: str = "gunicorn.workers.sync.SyncWorker", section: str = "gunicorn.workers"
20+
) -> type[Logger | Worker]: ...
1721

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

0 commit comments

Comments
 (0)