stdlib: Fix more signatures with unrepresentable defaults (#11007)

This commit is contained in:
Jelle Zijlstra
2023-11-09 18:20:09 -08:00
committed by GitHub
parent b8932899ea
commit 4deef7550f
6 changed files with 48 additions and 25 deletions

View File

@@ -213,7 +213,7 @@ class StreamWriter(Codec):
def reset(self) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None) -> None: ...
def __getattr__(self, name: str, getattr: Callable[[str], Any] = ...) -> Any: ...
def __getattr__(self, name: str, getattr: Callable[[Any, str], Any] = ...) -> Any: ...
class StreamReader(Codec):
stream: _ReadableStream
@@ -227,7 +227,7 @@ class StreamReader(Codec):
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None) -> None: ...
def __iter__(self) -> Self: ...
def __next__(self) -> str: ...
def __getattr__(self, name: str, getattr: Callable[[str], Any] = ...) -> Any: ...
def __getattr__(self, name: str, getattr: Callable[[Any, str], Any] = ...) -> Any: ...
# Doesn't actually inherit from TextIO, but wraps a BinaryIO to provide text reading and writing
# and delegates attributes to the underlying binary stream with __getattr__.