mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import email.message
|
||||
import io
|
||||
import sys
|
||||
from _typeshed import Self, StrPath, SupportsNoArgReadline, SupportsRead
|
||||
from _typeshed import StrPath, SupportsNoArgReadline, SupportsRead
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, AnyStr, Generic, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@@ -235,7 +235,7 @@ class _ProxyFile(Generic[AnyStr]):
|
||||
def tell(self) -> int: ...
|
||||
def seek(self, offset: int, whence: int = 0) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None) -> None: ...
|
||||
def readable(self) -> bool: ...
|
||||
def writable(self) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user