Skip to content

Commit f23abec

Browse files
[gunicorn] Update stubs for workers/sync.pyi
1 parent b25a69a commit f23abec

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed
Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
from gunicorn.workers import base
1+
import socket
2+
3+
from gunicorn.http import Request
4+
from gunicorn.workers.base import Worker
5+
6+
from ..util import _AddressType
7+
28

39
class StopWaiting(Exception): ...
410

5-
class SyncWorker(base.Worker):
6-
def accept(self, listener) -> None: ...
7-
def wait(self, timeout): ...
8-
def is_parent_alive(self): ...
9-
def run_for_one(self, timeout) -> None: ...
10-
def run_for_multiple(self, timeout) -> None: ...
11+
12+
class SyncWorker(Worker):
13+
def accept(self, listener: socket.socket) -> None: ...
14+
def wait(self, timeout: int) -> list[socket.socket | int] | None: ...
15+
def is_parent_alive(self) -> bool: ...
16+
def run_for_one(self, timeout: int) -> None: ...
17+
def run_for_multiple(self, timeout: int) -> None: ...
1118
def run(self) -> None: ...
12-
def handle(self, listener, client, addr) -> None: ...
13-
alive: bool
14-
def handle_request(self, listener, req, client, addr) -> None: ...
19+
def handle(self, listener: socket.socket, client: socket.socket, addr: _AddressType) -> None: ...
20+
def handle_request(self, listener: socket.socket, req: Request, client: socket.socket, addr: tuple[str, int]) -> None: ...
21+
def handle_error(self, req: Request, client: socket.socket, addr: _AddressType, exc: BaseException) -> None: ...

0 commit comments

Comments
 (0)