mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-22 01:28:29 +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 @@
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user