mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 20:12:08 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import sys
|
||||
from _typeshed import AnyStr_co, Self, StrOrBytesPath
|
||||
from _typeshed import AnyStr_co, StrOrBytesPath
|
||||
from collections.abc import Callable, Iterable, Iterator
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, AnyStr, Generic, Protocol, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@@ -289,11 +289,11 @@ class FileInput(Iterator[AnyStr], Generic[AnyStr]):
|
||||
|
||||
def __del__(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __iter__(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