Skip to content

Commit 448c4bb

Browse files
[gunicorn] Fix load_entry_point Any return annotation
1 parent 60c219f commit 448c4bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stubs/gunicorn/gunicorn/util.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import types
22
from _typeshed import FileDescriptorLike, FileDescriptorOrPath, HasFileno, StrOrBytesPath
3-
from collections.abc import Callable
43
from inspect import _ParameterKind
54
from socket import socket
65
from typing import Any, Literal, NoReturn
76
from urllib.parse import SplitResult
87

98
from ._types import _AddressType, _WSGIAppType
9+
from .config import _HookType
1010

1111
REDIRECT_TO: str
1212
hop_headers: set[str]
1313

14-
def load_entry_point(distribution: str, group: str, name: str) -> Any: ...
14+
def load_entry_point(distribution: str, group: str, name: str) -> type[object]: ...
1515
def load_class(
1616
uri: str | object, default: str = "gunicorn.workers.sync.SyncWorker", section: str = "gunicorn.workers"
1717
) -> type[Any]: ...
1818

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

21-
def get_arity(f: Callable[..., Any]) -> int: ...
21+
def get_arity(f: _HookType) -> int: ...
2222
def get_username(uid: int) -> str: ...
2323
def set_owner_process(uid: int, gid: int, initgroups: bool = False) -> None: ...
2424
def chown(path: FileDescriptorOrPath, uid: int, gid: int) -> None: ...

0 commit comments

Comments
 (0)