mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use _typeshed.Self with __enter__ (#5712)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import StrOrBytesPath
|
||||
from _typeshed import Self, StrOrBytesPath
|
||||
from typing import IO, Any, AnyStr, Callable, Generic, Iterable, Iterator, Union
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
@@ -78,7 +78,7 @@ class FileInput(Iterable[AnyStr], Generic[AnyStr]):
|
||||
) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self) -> FileInput[AnyStr]: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
|
||||
def __iter__(self) -> Iterator[AnyStr]: ...
|
||||
def __next__(self) -> AnyStr: ...
|
||||
|
||||
Reference in New Issue
Block a user