From e05edb60f17a8b2e96633043f3cc0fc5997ceaa7 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Wed, 13 Jul 2016 17:38:40 +0100 Subject: [PATCH] Mypy stub fixes for strict optional mode (#366) --- stdlib/2and3/logging/handlers.pyi | 2 +- stdlib/3/io.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2and3/logging/handlers.pyi b/stdlib/2and3/logging/handlers.pyi index 0b513850e..e7223540c 100644 --- a/stdlib/2and3/logging/handlers.pyi +++ b/stdlib/2and3/logging/handlers.pyi @@ -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: ... diff --git a/stdlib/3/io.pyi b/stdlib/3/io.pyi index 8a41482df..7b915fcad 100644 --- a/stdlib/3/io.pyi +++ b/stdlib/3/io.pyi @@ -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):