Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,12 @@ class object:
# Overriding them in subclasses has different semantics, even if the override has an identical signature.
def __setattr__(self, name: str, value: Any, /) -> None: ...
def __delattr__(self, name: str, /) -> None: ...
def __eq__(self, value: object, /) -> bool: ...
def __ne__(self, value: object, /) -> bool: ...
# Using 'Any' rather than 'object' for the argument because
# classes may want to restrict the type.
# Using 'Any | bool' rather than 'bool' for the return type because
# classes may want to return a wider type (e.g. numpy array)
def __eq__(self, value: Any, /) -> Any | bool: ... # noqa: Y032
def __ne__(self, value: Any, /) -> Any | bool: ... # noqa: Y032
def __str__(self) -> str: ... # noqa: Y029
def __repr__(self) -> str: ... # noqa: Y029
def __hash__(self) -> int: ...
Expand Down