diff --git a/stubs/reportlab/METADATA.toml b/stubs/reportlab/METADATA.toml index e05df1b21d12..e4f6253d99e5 100644 --- a/stubs/reportlab/METADATA.toml +++ b/stubs/reportlab/METADATA.toml @@ -1,4 +1,4 @@ -version = "~= 4.4.1" +version = "4.4.4" # GitHub mirror of https://hg.reportlab.com/hg-public/reportlab/file upstream_repository = "https://github.com/MrBitBucket/reportlab-mirror" diff --git a/stubs/reportlab/reportlab/graphics/charts/textlabels.pyi b/stubs/reportlab/reportlab/graphics/charts/textlabels.pyi index bcd2d2c33533..1c6d32a18292 100644 --- a/stubs/reportlab/reportlab/graphics/charts/textlabels.pyi +++ b/stubs/reportlab/reportlab/graphics/charts/textlabels.pyi @@ -2,20 +2,26 @@ from _typeshed import Incomplete from typing import Final from reportlab.graphics.charts.utils import CustomDrawChanger +from reportlab.graphics.shapes import Drawing, Group from reportlab.graphics.widgetbase import PropHolder, Widget from reportlab.lib.attrmap import * __version__: Final[str] class Label(Widget): - def __init__(self, **kw) -> None: ... - def setText(self, text) -> None: ... + # TODO: This has more attributes. x: Incomplete y: Incomplete + def __init__(self, **kw) -> None: ... + @property + def padding(self): ... + @padding.setter + def padding(self, p) -> None: ... + def setText(self, text) -> None: ... def setOrigin(self, x, y) -> None: ... - def demo(self): ... + def demo(self) -> Drawing: ... def computeSize(self) -> None: ... - def draw(self): ... + def draw(self) -> Group: ... class LabelDecorator: textAnchor: str diff --git a/stubs/reportlab/reportlab/graphics/widgetbase.pyi b/stubs/reportlab/reportlab/graphics/widgetbase.pyi index e02d3857b65e..b937f01cc9e7 100644 --- a/stubs/reportlab/reportlab/graphics/widgetbase.pyi +++ b/stubs/reportlab/reportlab/graphics/widgetbase.pyi @@ -15,9 +15,8 @@ class PropHolder: def dumpProperties(self, prefix: str = "") -> None: ... class Widget(PropHolder, shapes.UserNode): - # TODO: draw should probably be marked abstract - def draw(self) -> None: ... - def demo(self) -> None: ... + def draw(self): ... # abstract, but not marked as @abstractmethod + def demo(self): ... # abstract, but not marked as @abstractmethod def provideNode(self) -> shapes.Shape: ... def getBounds(self) -> tuple[float, float, float, float]: ... diff --git a/stubs/reportlab/reportlab/platypus/tables.pyi b/stubs/reportlab/reportlab/platypus/tables.pyi index 617c86634b3f..905b2fd8180c 100644 --- a/stubs/reportlab/reportlab/platypus/tables.pyi +++ b/stubs/reportlab/reportlab/platypus/tables.pyi @@ -1,7 +1,7 @@ from _typeshed import Incomplete from abc import abstractmethod from collections.abc import Collection, Iterable, Sequence -from typing import Any, Literal, overload +from typing import Any, Literal, NamedTuple, overload from typing_extensions import TypeAlias, Unpack from reportlab.lib.colors import Color @@ -55,6 +55,13 @@ class TableStyle: def add(self, *cmd: Unpack[_RoundedCornersTableCommand]) -> None: ... def getCommands(self) -> list[_TableCommand]: ... +class ShadowStyle(NamedTuple): + dx: int | Incomplete = 10 # TODO: is either `int` or `float` + dy: int | Incomplete = -10 # TODO: is either `int` or `float` + color0: _Color = "grey" + color1: _Color = "white" + nshades: int = 30 + class Table(Flowable): ident: str | None repeatRows: int @@ -89,6 +96,7 @@ class Table(Flowable): minRowHeights: Sequence[float] | None = None, cornerRadii: _CornerRadii | _UNSET_ | None = ..., renderCB: TableRenderCB | None = None, + shadow: ShadowStyle | None = None, ) -> None: ... def identity(self, maxLen: int | None = 30) -> str: ... def normalizeData(self, data: Iterable[Iterable[Any]]) -> list[list[Any]]: ...