mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 11:32:07 +08:00
Reduce use of Any in equality methods (#7081)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -41,6 +41,6 @@ class DFAState:
|
||||
def __init__(self, nfaset: dict[NFAState, Any], final: NFAState) -> None: ...
|
||||
def addarc(self, next: DFAState, label: Text) -> None: ...
|
||||
def unifystate(self, old: DFAState, new: DFAState) -> None: ...
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __eq__(self, other: DFAState) -> bool: ... # type: ignore[override]
|
||||
|
||||
def generate_grammar(filename: StrPath = ...) -> PgenGrammar: ...
|
||||
|
||||
@@ -20,7 +20,7 @@ class Base:
|
||||
children: list[_NL]
|
||||
was_changed: bool
|
||||
was_checked: bool
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def _eq(self: _P, other: _P) -> bool: ...
|
||||
def clone(self: Self) -> Self: ...
|
||||
def post_order(self) -> Iterator[_NL]: ...
|
||||
|
||||
@@ -46,8 +46,8 @@ class Complex(Number):
|
||||
def __rpow__(self, base: Any) -> Any: ...
|
||||
def __abs__(self) -> Real: ...
|
||||
def conjugate(self) -> Any: ...
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __ne__(self, other: Any) -> bool: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
|
||||
class Real(Complex, SupportsFloat):
|
||||
@abstractmethod
|
||||
|
||||
@@ -9,8 +9,8 @@ class BaseSet(Iterable[_T]):
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_T]: ...
|
||||
def __cmp__(self, other: Any) -> int: ...
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __ne__(self, other: Any) -> bool: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def copy(self: Self) -> Self: ...
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __deepcopy__(self: Self, memo: MutableMapping[int, BaseSet[_T]]) -> Self: ...
|
||||
|
||||
@@ -71,7 +71,7 @@ class NamedNodeMap:
|
||||
def values(self): ...
|
||||
def get(self, name, value: Any | None = ...): ...
|
||||
def __len__(self) -> int: ...
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ge__(self, other: Any) -> bool: ...
|
||||
def __gt__(self, other: Any) -> bool: ...
|
||||
def __le__(self, other: Any) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user