Use typing_extensions.Self instead of _typeshed.Self (#9702)

This commit is contained in:
Alex Waygood
2023-02-15 11:32:43 +01:00
committed by GitHub
parent 8cd6d81f15
commit 7180d0223b
140 changed files with 597 additions and 610 deletions

View File

@@ -1,8 +1,7 @@
from _typeshed import Self
from collections.abc import Callable
from types import TracebackType
from typing import TypeVar
from typing_extensions import ParamSpec
from typing_extensions import ParamSpec, Self
_AC = TypeVar("_AC", bound=Callable[..., object])
_R = TypeVar("_R")
@@ -10,7 +9,7 @@ _P = ParamSpec("_P")
class Python:
def __init__(self, strict_mode: bool | None = None) -> 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: ...