mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
stdlib: correct many pos-or-kw arg names in dunder methods (#7451)
This commit is contained in:
@@ -240,7 +240,7 @@ class StreamWriter(Codec):
|
||||
def writelines(self, list: Iterable[str]) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
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: ...
|
||||
|
||||
class StreamReader(Codec, Iterator[str]):
|
||||
@@ -251,7 +251,7 @@ class StreamReader(Codec, Iterator[str]):
|
||||
def readlines(self, sizehint: int | None = ..., keepends: bool = ...) -> list[str]: ...
|
||||
def reset(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __next__(self) -> str: ...
|
||||
def __getattr__(self, name: str, getattr: Callable[[str], Any] = ...) -> Any: ...
|
||||
@@ -270,7 +270,7 @@ class StreamReaderWriter(TextIO):
|
||||
def reset(self) -> None: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> None: ... # type: ignore[override]
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ...
|
||||
# These methods don't actually exist directly, but they are needed to satisfy the TextIO
|
||||
# interface. At runtime, they are delegated through __getattr__.
|
||||
|
||||
Reference in New Issue
Block a user