mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Mypy stub fixes for strict optional mode (#366)
This commit is contained in:
committed by
Guido van Rossum
parent
bca4c81b70
commit
e05edb60f1
@@ -104,7 +104,7 @@ class SocketHandler(Handler):
|
||||
if sys.version_info >= (3, 4):
|
||||
def __init__(self, host: str, port: Optional[int]) -> None: ...
|
||||
else:
|
||||
def __init__(self, host: str, port: int) -> None: ...
|
||||
def __init__(self, host: str, port: int) -> None: ... # type: ignore
|
||||
def makeSocket(self) -> SocketType: ...
|
||||
def makePickle(self, record: LogRecord) -> bytes: ...
|
||||
def send(self, packet: bytes) -> None: ...
|
||||
|
||||
@@ -132,7 +132,7 @@ class BytesIO(BinaryIO):
|
||||
# copied from BufferedIOBase
|
||||
def detach(self) -> RawIOBase: ...
|
||||
def readinto(self, b: bytearray) -> int: ...
|
||||
def write(self, b: Union[bytes, bytearray]) -> Optional[int]: ...
|
||||
def write(self, b: Union[bytes, bytearray]) -> int: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def readinto1(self, b: bytearray) -> int: ...
|
||||
if sys.version_info >= (3, 4):
|
||||
|
||||
Reference in New Issue
Block a user