mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Amend annotation for asyncio.Protocol.__slots__ (#14980)
This commit is contained in:
@@ -14,7 +14,7 @@ class BaseProtocol:
|
||||
|
||||
class Protocol(BaseProtocol):
|
||||
# Need annotation or mypy will complain about 'Cannot determine type of "__slots__" in base class'
|
||||
__slots__: tuple[()] = ()
|
||||
__slots__: tuple[str, ...] = ()
|
||||
def data_received(self, data: bytes) -> None: ...
|
||||
def eof_received(self) -> bool | None: ...
|
||||
|
||||
@@ -35,7 +35,7 @@ class DatagramProtocol(BaseProtocol):
|
||||
def error_received(self, exc: Exception) -> None: ...
|
||||
|
||||
class SubprocessProtocol(BaseProtocol):
|
||||
__slots__: tuple[()] = ()
|
||||
__slots__: tuple[str, ...] = ()
|
||||
def pipe_data_received(self, fd: int, data: bytes) -> None: ...
|
||||
def pipe_connection_lost(self, fd: int, exc: Exception | None) -> None: ...
|
||||
def process_exited(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user