mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, NamedTuple, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = ["Error", "open"]
|
||||
@@ -24,7 +23,7 @@ _Marker: TypeAlias = tuple[int, int, bytes]
|
||||
|
||||
class Aifc_read:
|
||||
def __init__(self, f: _File) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
@@ -48,7 +47,7 @@ class Aifc_read:
|
||||
class Aifc_write:
|
||||
def __init__(self, f: _File) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user