mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Fix return types for asyncio recvfrom, recvfrom_into, and sendto (#10000)
Closes #9999
This commit is contained in:
committed by
GitHub
parent
f828ce63e8
commit
6a242fd1ee
@@ -569,11 +569,11 @@ class AbstractEventLoop:
|
||||
async def sock_accept(self, sock: socket) -> tuple[socket, _RetAddress]: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
@abstractmethod
|
||||
async def sock_recvfrom(self, sock: socket, bufsize: int) -> bytes: ...
|
||||
async def sock_recvfrom(self, sock: socket, bufsize: int) -> tuple[bytes, _RetAddress]: ...
|
||||
@abstractmethod
|
||||
async def sock_recvfrom_into(self, sock: socket, buf: WriteableBuffer, nbytes: int = 0) -> int: ...
|
||||
async def sock_recvfrom_into(self, sock: socket, buf: WriteableBuffer, nbytes: int = 0) -> tuple[int, _RetAddress]: ...
|
||||
@abstractmethod
|
||||
async def sock_sendto(self, sock: socket, data: ReadableBuffer, address: _Address) -> None: ...
|
||||
async def sock_sendto(self, sock: socket, data: ReadableBuffer, address: _Address) -> int: ...
|
||||
# Signal handling.
|
||||
@abstractmethod
|
||||
def add_signal_handler(self, sig: int, callback: Callable[..., object], *args: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user