change Change IO/IOBase.__exit__ return type to None (#7471)

This commit is contained in:
Aaron Kau
2022-03-10 06:57:05 -08:00
committed by GitHub
parent bf2049ef18
commit a3e62d56fc
3 changed files with 3 additions and 3 deletions

View File

@@ -130,7 +130,7 @@ class HTTPResponse(io.BufferedIOBase, BinaryIO): # type: ignore # argument disp
def __enter__(self: Self) -> Self: ...
def __exit__(
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None
) -> bool | None: ...
) -> None: ...
def info(self) -> email.message.Message: ...
def geturl(self) -> str: ...
def getcode(self) -> int: ...

View File

@@ -72,7 +72,7 @@ class IOBase:
def __enter__(self: Self) -> Self: ...
def __exit__(
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> bool | None: ...
) -> None: ...
def close(self) -> None: ...
def fileno(self) -> int: ...
def flush(self) -> None: ...

View File

@@ -1026,7 +1026,7 @@ class IO(Iterator[AnyStr], Generic[AnyStr]):
@abstractmethod
def __exit__(
self, __t: Type[BaseException] | None, __value: BaseException | None, __traceback: TracebackType | None
) -> bool | None: ...
) -> None: ...
class BinaryIO(IO[bytes]):
@abstractmethod