Annotate known magic-method return types (#9131)

This commit is contained in:
Nikita Sobolev
2022-11-08 21:28:42 +03:00
committed by GitHub
parent c0e9038f0d
commit 62a6c3d616
87 changed files with 172 additions and 172 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ class _Operand:
im: Any
def __init__(self, im) -> None: ...
def apply(self, op, im1, im2: Any | None = ..., mode: Any | None = ...): ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
def __abs__(self): ...
def __pos__(self): ...
def __neg__(self): ...
+2 -2
View File
@@ -3,12 +3,12 @@ from typing import Any
class HDC:
dc: Any
def __init__(self, dc) -> None: ...
def __int__(self): ...
def __int__(self) -> int: ...
class HWND:
wnd: Any
def __init__(self, wnd) -> None: ...
def __int__(self): ...
def __int__(self) -> int: ...
class Dib:
image: Any
+7 -7
View File
@@ -12,10 +12,10 @@ class PdfFormatError(RuntimeError): ...
def check_format_condition(condition, error_message) -> None: ...
class IndirectReference:
def __bytes__(self): ...
def __bytes__(self) -> bytes: ...
def __eq__(self, other): ...
def __ne__(self, other): ...
def __hash__(self): ...
def __hash__(self) -> int: ...
class IndirectObjectDef(IndirectReference): ...
@@ -29,7 +29,7 @@ class XrefTable:
def __getitem__(self, key): ...
def __delitem__(self, key) -> None: ...
def __contains__(self, key): ...
def __len__(self): ...
def __len__(self) -> int: ...
def keys(self): ...
def write(self, f): ...
@@ -38,14 +38,14 @@ class PdfName:
def __init__(self, name) -> None: ...
def name_as_str(self): ...
def __eq__(self, other): ...
def __hash__(self): ...
def __hash__(self) -> int: ...
@classmethod
def from_pdf_stream(cls, data): ...
allowed_chars: Any
def __bytes__(self): ...
def __bytes__(self) -> bytes: ...
class PdfArray(list[Any]):
def __bytes__(self): ...
def __bytes__(self) -> bytes: ...
class PdfDict(collections.UserDict[bytes, Any]):
def __setattr__(self, key, value) -> None: ...
@@ -55,7 +55,7 @@ class PdfDict(collections.UserDict[bytes, Any]):
class PdfBinary:
data: Any
def __init__(self, data) -> None: ...
def __bytes__(self): ...
def __bytes__(self) -> bytes: ...
class PdfStream:
dictionary: Any
+1 -1
View File
@@ -10,7 +10,7 @@ class PyAccess:
image32: Any
image: Any
def __init__(self, img, readonly: bool = ...) -> None: ...
def __setitem__(self, xy, color): ...
def __setitem__(self, xy, color) -> None: ...
def __getitem__(self, xy): ...
putpixel: Any
getpixel: Any
+2 -2
View File
@@ -59,7 +59,7 @@ class IFDRational(Rational):
@property
def denominator(a): ...
def limit_rational(self, max_denominator): ...
def __hash__(self): ...
def __hash__(self) -> int: ...
def __eq__(self, other): ...
__add__: Any
__radd__: Any
@@ -131,7 +131,7 @@ class ImageFileDirectory_v1(ImageFileDirectory_v2):
def from_v2(cls, original): ...
def to_v2(self): ...
def __contains__(self, tag): ...
def __len__(self): ...
def __len__(self) -> int: ...
def __iter__(self): ...
def __setitem__(self, tag, value) -> None: ...
def __getitem__(self, tag): ...