mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Corrected type for "data" in two methods (#3562)
The documentation states: * datagram_received: "data is a bytes object containing the incoming data." * pipe_data_received: "data is a non-empty bytes object containing the received data."
This commit is contained in:
committed by
Sebastian Rittau
parent
83f9d833fb
commit
f5a1925e76
@@ -1,5 +1,5 @@
|
||||
from asyncio import transports
|
||||
from typing import Optional, Text, Tuple, Union
|
||||
from typing import Optional, Tuple, Union
|
||||
|
||||
class BaseProtocol:
|
||||
def connection_made(self, transport: transports.BaseTransport) -> None: ...
|
||||
@@ -16,10 +16,10 @@ class BufferedProtocol(Protocol):
|
||||
def buffer_updated(self, nbytes: int) -> None: ...
|
||||
|
||||
class DatagramProtocol(BaseProtocol):
|
||||
def datagram_received(self, data: Union[bytes, Text], addr: Tuple[str, int]) -> None: ...
|
||||
def datagram_received(self, data: bytes, addr: Tuple[str, int]) -> None: ...
|
||||
def error_received(self, exc: Exception) -> None: ...
|
||||
|
||||
class SubprocessProtocol(BaseProtocol):
|
||||
def pipe_data_received(self, fd: int, data: Union[bytes, Text]) -> None: ...
|
||||
def pipe_data_received(self, fd: int, data: bytes) -> None: ...
|
||||
def pipe_connection_lost(self, fd: int, exc: Optional[Exception]) -> None: ...
|
||||
def process_exited(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user