Forbid extremely long line lengths in non-autogenerated stubs (#12537)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Avasam
2024-08-18 16:03:34 -04:00
committed by GitHub
parent eca1df49f3
commit 937270df0c
15 changed files with 69 additions and 27 deletions

View File

@@ -1,5 +1,6 @@
from datetime import date, datetime, time, timedelta
from decimal import Decimal
from typing import Any
from typing_extensions import TypeAlias
from openpyxl.cell.rich_text import CellRichText
@@ -20,3 +21,4 @@ _CellValue: TypeAlias = ( # noqa: Y047 # Used in other modules
| DataTableFormula
| ArrayFormula
)
_AnyCellValue: TypeAlias = Any # Any of _CellValue # noqa: Y047 # Used in other modules

View File

@@ -83,7 +83,9 @@ class Series(Serialisable):
explosion: _HasTagAndGet[ConvertibleToInt | None] | ConvertibleToInt | None = None,
extLst: Unused = None,
) -> None: ...
def to_tree(self, tagname: str | None = None, idx: _HasTagAndGet[ConvertibleToInt] | ConvertibleToInt | None = None) -> Element: ... # type: ignore[override]
def to_tree( # type: ignore[override]
self, tagname: str | None = None, idx: _HasTagAndGet[ConvertibleToInt] | ConvertibleToInt | None = None
) -> Element: ...
class XYSeries(Series):
# Same as parent

View File

@@ -1,9 +1,10 @@
from _typeshed import Incomplete, SupportsGetItem, Unused
from collections.abc import Container, Generator
from datetime import datetime
from typing import Any, Final
from typing import Final
from xml.etree.ElementTree import _FileRead
from openpyxl.cell import _AnyCellValue
from openpyxl.cell.cell import Cell
from openpyxl.cell.rich_text import CellRichText
from openpyxl.descriptors.serialisable import _ChildSerialisableTreeElement, _SerialisableTreeElement
@@ -86,12 +87,10 @@ class WorkSheetParser:
) -> None: ...
def parse(self) -> Generator[Incomplete, None, None]: ...
def parse_dimensions(self) -> _RangeBoundariesTuple | None: ...
# AnyOf[time, date, datetime, timedelta, float, int, bool, str, ArrayFormula, DataTableFormula, Translator, Text, TextBlock, CellRichText, None]
def parse_cell(self, element) -> dict[str, Any]: ...
def parse_cell(self, element) -> dict[str, _AnyCellValue]: ...
def parse_formula(self, element): ...
def parse_column_dimensions(self, col: _HasAttrib) -> None: ...
# Any: Same as parse_cell
def parse_row(self, row: _SupportsIterAndAttrib) -> tuple[int, list[dict[str, Any]]]: ...
def parse_row(self, row: _SupportsIterAndAttrib) -> tuple[int, list[dict[str, _AnyCellValue]]]: ...
def parse_formatting(self, element: _ChildSerialisableTreeElement) -> None: ...
def parse_sheet_protection(self, element: _SerialisableTreeElement) -> None: ...
def parse_extensions(self, element: _ChildSerialisableTreeElement) -> None: ...