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
@@ -31,7 +31,7 @@ class ChartBase(Serialisable):
pivotFormats: Any
idx_base: int
def __init__(self, axId=..., **kw) -> None: ...
def __hash__(self): ...
def __hash__(self) -> int: ...
def __iadd__(self, other): ...
def to_tree(self, namespace: Any | None = ..., tagname: Any | None = ..., idx: Any | None = ...): ... # type: ignore[override]
def set_categories(self, labels) -> None: ...
+1 -1
View File
@@ -23,7 +23,7 @@ class Reference(Strict):
max_row: Any | None = ...,
range_string: Any | None = ...,
) -> None: ...
def __len__(self): ...
def __len__(self) -> int: ...
def __eq__(self, other): ...
@property
def rows(self) -> Generator[Any, None, None]: ...
@@ -22,6 +22,6 @@ class Serialisable(_Serialiasable):
def __iter__(self): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
def __hash__(self): ...
def __hash__(self) -> int: ...
def __add__(self, other): ...
def __copy__(self): ...
@@ -90,7 +90,7 @@ class SpreadsheetDrawing(Serialisable):
charts: Any
images: Any
def __init__(self, twoCellAnchor=..., oneCellAnchor=..., absoluteAnchor=...) -> None: ...
def __hash__(self): ...
def __bool__(self): ...
def __hash__(self) -> int: ...
def __bool__(self) -> bool: ...
@property
def path(self): ...
@@ -11,15 +11,15 @@ class ConditionalFormatting(Serialisable):
rules: Any
def __init__(self, sqref=..., pivot: Any | None = ..., cfRule=..., extLst: Any | None = ...) -> None: ...
def __eq__(self, other): ...
def __hash__(self): ...
def __hash__(self) -> int: ...
def __contains__(self, coord): ...
class ConditionalFormattingList:
max_priority: int
def __init__(self) -> None: ...
def add(self, range_string, cfRule) -> None: ...
def __bool__(self): ...
def __len__(self): ...
def __bool__(self) -> bool: ...
def __len__(self) -> int: ...
def __iter__(self): ...
def __getitem__(self, key): ...
def __delitem__(self, key) -> None: ...
@@ -25,8 +25,8 @@ class RelationshipList(Serialisable):
Relationship: Any
def __init__(self, Relationship=...) -> None: ...
def append(self, value) -> None: ...
def __len__(self): ...
def __bool__(self): ...
def __len__(self) -> int: ...
def __bool__(self) -> bool: ...
def find(self, content_type) -> Generator[Any, None, None]: ...
def __getitem__(self, key): ...
def to_tree(self): ...
@@ -21,7 +21,7 @@ class StyleArray(array[Any]):
quotePrefix: Any
xfId: Any
def __new__(cls, args=...): ...
def __hash__(self): ...
def __hash__(self) -> int: ...
def __copy__(self): ...
def __deepcopy__(self, memo): ...
+1 -1
View File
@@ -55,6 +55,6 @@ class ColorList(Serialisable):
mruColors: Any
__elements__: Any
def __init__(self, indexedColors=..., mruColors=...) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
@property
def index(self): ...
@@ -31,7 +31,7 @@ class DifferentialStyleList(Serialisable):
def __init__(self, dxf=..., count: Any | None = ...) -> None: ...
def append(self, dxf) -> None: ...
def add(self, dxf): ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
def __getitem__(self, idx): ...
@property
def count(self): ...
@@ -64,7 +64,7 @@ class DefinedNameList(Serialisable):
definedName: Any
def __init__(self, definedName=...) -> None: ...
def append(self, defn) -> None: ...
def __len__(self): ...
def __len__(self) -> int: ...
def __contains__(self, name): ...
def __getitem__(self, name): ...
def get(self, name, scope: Any | None = ...): ...
@@ -67,7 +67,7 @@ class MultiCellRange(Strict):
def __iadd__(self, coord): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
def remove(self, coord) -> None: ...
def __iter__(self): ...
def __copy__(self): ...
@@ -67,6 +67,6 @@ class DataValidationList(Serialisable):
) -> None: ...
@property
def count(self): ...
def __len__(self): ...
def __len__(self) -> int: ...
def append(self, dv) -> None: ...
def to_tree(self, tagname: Any | None = ...): ... # type: ignore[override]
@@ -40,7 +40,7 @@ class SortState(Serialisable):
sortCondition=...,
extLst: Any | None = ...,
) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
class IconFilter(Serialisable):
tagname: str
@@ -161,6 +161,6 @@ class AutoFilter(Serialisable):
def __init__(
self, ref: Any | None = ..., filterColumn=..., sortState: Any | None = ..., extLst: Any | None = ...
) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
def add_filter_column(self, col_id, vals, blank: bool = ...) -> None: ...
def add_sort_condition(self, ref, descending: bool = ...) -> None: ...
@@ -17,7 +17,7 @@ class _HeaderFooterPart(Strict):
def __init__(
self, text: Any | None = ..., font: Any | None = ..., size: Any | None = ..., color: Any | None = ...
) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
@classmethod
def from_str(cls, text): ...
@@ -27,7 +27,7 @@ class HeaderFooterItem(Strict):
centre: Any
right: Any
def __init__(self, left: Any | None = ..., right: Any | None = ..., center: Any | None = ...) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
def to_tree(self, tagname): ...
@classmethod
def from_tree(cls, node): ...
@@ -58,4 +58,4 @@ class HeaderFooter(Serialisable):
firstHeader: Any | None = ...,
firstFooter: Any | None = ...,
) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
@@ -25,6 +25,6 @@ class HyperlinkList(Serialisable):
tagname: str
hyperlink: Any
def __init__(self, hyperlink=...) -> None: ...
def __bool__(self): ...
def __len__(self): ...
def __bool__(self) -> bool: ...
def __len__(self) -> int: ...
def append(self, value) -> None: ...
+2 -2
View File
@@ -46,7 +46,7 @@ class PrintPageSetup(Serialisable):
copies: Any | None = ...,
id: Any | None = ...,
) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
@property
def sheet_properties(self): ...
@property
@@ -75,7 +75,7 @@ class PrintOptions(Serialisable):
gridLines: Any | None = ...,
gridLinesSet: Any | None = ...,
) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
class PageMargins(Serialisable):
tagname: str
@@ -20,8 +20,8 @@ class RowBreak(Serialisable):
__elements__: Any
__attrs__: Any
def __init__(self, count: Any | None = ..., manualBreakCount: Any | None = ..., brk=...) -> None: ...
def __bool__(self): ...
def __len__(self): ...
def __bool__(self) -> bool: ...
def __len__(self) -> int: ...
@property
def count(self): ...
@property
@@ -61,4 +61,4 @@ class SheetProtection(Serialisable, _Protected):
def set_password(self, value: str = ..., already_hashed: bool = ...) -> None: ...
def enable(self) -> None: ...
def disable(self) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
@@ -45,4 +45,4 @@ class ScenarioList(Serialisable):
__elements__: Any
def __init__(self, scenario=..., current: Any | None = ..., show: Any | None = ..., sqref: Any | None = ...) -> None: ...
def append(self, scenario) -> None: ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
+1 -1
View File
@@ -169,7 +169,7 @@ class TablePartList(Serialisable):
def append(self, part) -> None: ...
@property
def count(self): ...
def __bool__(self): ...
def __bool__(self) -> bool: ...
class TableList(dict[Any, Any]):
def add(self, table) -> None: ...