Skip to content

Commit 8912ebf

Browse files
authored
Update arbiter.pyi
`Arbiter.LISTENERS` is actually a list of `BaseSocket`. You can see this if you follow the calls from [`create_sockets` in Gunicorn](https://github.com/benoitc/gunicorn/blob/56b5ad87f8d72a674145c273ed8f547513c2b409/gunicorn/arbiter.py#L156). It's also correctly `BaseSocket` in the [Typeshed `sock.pyi` file](https://github.com/python/typeshed/blob/main/stubs/gunicorn/gunicorn/sock.pyi#L35).
1 parent 3f1cdc5 commit 8912ebf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stubs/gunicorn/gunicorn/arbiter.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ from typing import ClassVar
55
from gunicorn.app.base import BaseApplication
66
from gunicorn.config import Config
77
from gunicorn.glogging import Logger as GLogger
8+
from gunicorn.sock import BaseSocket
89
from gunicorn.workers.base import Worker
910

1011
from ._types import _AddressType
@@ -14,7 +15,7 @@ class Arbiter:
1415
WORKER_BOOT_ERROR: ClassVar[int]
1516
APP_LOAD_ERROR: ClassVar[int]
1617
START_CTX: ClassVar[dict[int | str, str | list[str]]]
17-
LISTENERS: ClassVar[list[socket.socket]]
18+
LISTENERS: ClassVar[list[BaseSocket]]
1819
WORKERS: ClassVar[dict[int, Worker]]
1920
PIPE: ClassVar[list[int]]
2021
SIG_QUEUE: ClassVar[list[int]]

0 commit comments

Comments
 (0)