Skip to content

Commit 12eb8f2

Browse files
Change return type of object.__eq__ and object.__ne__ to object rather than Any to avoid no-ant-return errors.
1 parent 2f2750f commit 12eb8f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/builtins.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ class object:
123123
def __delattr__(self, name: str, /) -> None: ...
124124
# Using 'Any' rather than 'object' for the argument because
125125
# classes may want to restrict the type.
126-
# Using 'Any' rather than 'bool' for the return type because
126+
# Using 'object' rather than 'bool' for the return type because
127127
# classes may want to return a wider type (e.g. numpy array)
128-
def __eq__(self, value: Any, /) -> Any: ... # noqa: Y032
129-
def __ne__(self, value: Any, /) -> Any: ... # noqa: Y032
128+
def __eq__(self, value: Any, /) -> object: ... # noqa: Y032
129+
def __ne__(self, value: Any, /) -> object: ... # noqa: Y032
130130
def __str__(self) -> str: ... # noqa: Y029
131131
def __repr__(self) -> str: ... # noqa: Y029
132132
def __hash__(self) -> int: ...

0 commit comments

Comments
 (0)