mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-13 03:21:07 +08:00
Annotate known magic-method return types (#9131)
This commit is contained in:
@@ -61,44 +61,44 @@ class Lib:
|
||||
class _CDataBase:
|
||||
__name__: ClassVar[str]
|
||||
def __add__(self, other): ...
|
||||
def __bool__(self): ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __call__(self, *args, **kwargs): ...
|
||||
def __complex__(self): ...
|
||||
def __delitem__(self, other): ...
|
||||
def __complex__(self) -> complex: ...
|
||||
def __delitem__(self, other) -> None: ...
|
||||
def __dir__(self): ...
|
||||
def __enter__(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __exit__(self, type, value, traceback): ...
|
||||
def __float__(self): ...
|
||||
def __float__(self) -> float: ...
|
||||
def __ge__(self, other): ...
|
||||
def __getitem__(self, index): ...
|
||||
def __gt__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
def __int__(self): ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __iter__(self): ...
|
||||
def __le__(self, other): ...
|
||||
def __len__(self): ...
|
||||
def __len__(self) -> int: ...
|
||||
def __lt__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __radd__(self, other): ...
|
||||
def __rsub__(self, other): ...
|
||||
def __setitem__(self, index, object): ...
|
||||
def __setitem__(self, index, object) -> None: ...
|
||||
def __sub__(self, other): ...
|
||||
|
||||
@final
|
||||
class buffer:
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def __delitem__(self, other): ...
|
||||
def __delitem__(self, other) -> None: ...
|
||||
def __eq__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
def __getitem__(self, index): ...
|
||||
def __gt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __len__(self): ...
|
||||
def __len__(self) -> int: ...
|
||||
def __lt__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __setitem__(self, index, object): ...
|
||||
def __setitem__(self, index, object) -> None: ...
|
||||
|
||||
# These aliases are to work around pyright complaints.
|
||||
# Pyright doesn't like it when a class object is defined as an alias
|
||||
|
||||
@@ -18,11 +18,11 @@ class CTypesData:
|
||||
def __le__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __repr__(self, c_name: str | None = ...): ...
|
||||
|
||||
class CTypesGenericPrimitive(CTypesData):
|
||||
def __hash__(self): ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class CTypesGenericArray(CTypesData):
|
||||
def __iter__(self): ...
|
||||
|
||||
@@ -21,7 +21,7 @@ class BaseTypeByIdentity:
|
||||
class BaseType(BaseTypeByIdentity):
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class VoidType(BaseType):
|
||||
c_name_with_marker: str
|
||||
|
||||
Reference in New Issue
Block a user