Reduce use of Any in equality methods (#7081)

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
Alex Waygood
2022-01-29 22:59:00 +00:00
committed by GitHub
parent 9aeecb4c35
commit 45a2dad83c
21 changed files with 38 additions and 37 deletions

View File

@@ -1,5 +1,6 @@
from collections.abc import Callable, Mapping, Sequence
from typing import Any, Generic, TypeVar, overload
from typing_extensions import Literal
_F = TypeVar("_F", bound=Callable[..., Any])
_T = TypeVar("_T")
@@ -40,8 +41,8 @@ class _Call(tuple[Any, ...]):
def __init__(
self, value: Any = ..., name: Any | None = ..., parent: Any | None = ..., two: bool = ..., from_kall: bool = ...
) -> None: ...
def __eq__(self, other: Any) -> bool: ...
__ne__: Any
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...
def __call__(self, *args: Any, **kwargs: Any) -> _Call: ...
def __getattr__(self, attr: str) -> Any: ...
@property
@@ -278,8 +279,8 @@ class MagicProxy(Base):
def __get__(self, obj: Any, _type: Any | None = ...) -> Any: ...
class _ANY:
def __eq__(self, other: Any) -> bool: ...
def __ne__(self, other: Any) -> bool: ...
def __eq__(self, other: object) -> Literal[True]: ...
def __ne__(self, other: object) -> Literal[False]: ...
ANY: Any