mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import sys
|
||||
from asyncio import transports
|
||||
from typing import Optional, Tuple
|
||||
from typing import Tuple
|
||||
|
||||
class BaseProtocol:
|
||||
def connection_made(self, transport: transports.BaseTransport) -> None: ...
|
||||
def connection_lost(self, exc: Optional[Exception]) -> None: ...
|
||||
def connection_lost(self, exc: Exception | None) -> None: ...
|
||||
def pause_writing(self) -> None: ...
|
||||
def resume_writing(self) -> None: ...
|
||||
|
||||
class Protocol(BaseProtocol):
|
||||
def data_received(self, data: bytes) -> None: ...
|
||||
def eof_received(self) -> Optional[bool]: ...
|
||||
def eof_received(self) -> bool | None: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
class BufferedProtocol(BaseProtocol):
|
||||
@@ -23,5 +23,5 @@ class DatagramProtocol(BaseProtocol):
|
||||
|
||||
class SubprocessProtocol(BaseProtocol):
|
||||
def pipe_data_received(self, fd: int, data: bytes) -> None: ...
|
||||
def pipe_connection_lost(self, fd: int, exc: Optional[Exception]) -> None: ...
|
||||
def pipe_connection_lost(self, fd: int, exc: Exception | None) -> None: ...
|
||||
def process_exited(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user