mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Reduce use of Any in equality methods (#7081)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user