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:
Alex Grönholm
2019-12-29 17:03:53 +02:00
committed by Sebastian Rittau
parent 83f9d833fb
commit f5a1925e76

View File

@@ -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: ...