mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterator
|
||||
from lib2to3.pgen2.grammar import Grammar
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
_NL: TypeAlias = Node | Leaf
|
||||
_Context: TypeAlias = tuple[str, int, int]
|
||||
@@ -21,8 +20,8 @@ class Base:
|
||||
was_changed: bool
|
||||
was_checked: bool
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def _eq(self: Self, other: Self) -> bool: ...
|
||||
def clone(self: Self) -> Self: ...
|
||||
def _eq(self, other: Self) -> bool: ...
|
||||
def clone(self) -> Self: ...
|
||||
def post_order(self) -> Iterator[_NL]: ...
|
||||
def pre_order(self) -> Iterator[_NL]: ...
|
||||
def replace(self, new: _NL | list[_NL]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user