mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Fix return annotations of several methods that return self at runtime (#7070)
This commit is contained in:
@@ -46,7 +46,7 @@ def fileno() -> int: ...
|
||||
def isfirstline() -> bool: ...
|
||||
def isstdin() -> bool: ...
|
||||
|
||||
class FileInput(Iterable[AnyStr], Generic[AnyStr]):
|
||||
class FileInput(Iterator[AnyStr], Generic[AnyStr]):
|
||||
if sys.version_info >= (3, 10):
|
||||
def __init__(
|
||||
self,
|
||||
@@ -83,7 +83,7 @@ class FileInput(Iterable[AnyStr], Generic[AnyStr]):
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
|
||||
def __iter__(self) -> Iterator[AnyStr]: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __next__(self) -> AnyStr: ...
|
||||
if sys.version_info < (3, 11):
|
||||
def __getitem__(self, i: int) -> AnyStr: ...
|
||||
|
||||
Reference in New Issue
Block a user