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 @@
import sys
from typing import Any, Awaitable, Callable, Generic, Iterable, Mapping, Sequence, TypeVar, overload
from typing_extensions import Literal
_T = TypeVar("_T")
_TT = TypeVar("_TT", bound=type[Any])
@@ -83,8 +84,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: Any) -> Any: ...
if sys.version_info >= (3, 8):
@@ -418,8 +419,8 @@ class MagicProxy:
def __get__(self, obj, _type: Any | None = ...): ...
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