Skip to content

Commit 70e6f63

Browse files
authored
[reportlab] Update to 4.4.4 (#14762)
1 parent a2c34cc commit 70e6f63

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

stubs/reportlab/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "~= 4.4.1"
1+
version = "4.4.4"
22
# GitHub mirror of https://hg.reportlab.com/hg-public/reportlab/file
33
upstream_repository = "https://github.com/MrBitBucket/reportlab-mirror"
44

stubs/reportlab/reportlab/graphics/charts/textlabels.pyi

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,26 @@ from _typeshed import Incomplete
22
from typing import Final
33

44
from reportlab.graphics.charts.utils import CustomDrawChanger
5+
from reportlab.graphics.shapes import Drawing, Group
56
from reportlab.graphics.widgetbase import PropHolder, Widget
67
from reportlab.lib.attrmap import *
78

89
__version__: Final[str]
910

1011
class Label(Widget):
11-
def __init__(self, **kw) -> None: ...
12-
def setText(self, text) -> None: ...
12+
# TODO: This has more attributes.
1313
x: Incomplete
1414
y: Incomplete
15+
def __init__(self, **kw) -> None: ...
16+
@property
17+
def padding(self): ...
18+
@padding.setter
19+
def padding(self, p) -> None: ...
20+
def setText(self, text) -> None: ...
1521
def setOrigin(self, x, y) -> None: ...
16-
def demo(self): ...
22+
def demo(self) -> Drawing: ...
1723
def computeSize(self) -> None: ...
18-
def draw(self): ...
24+
def draw(self) -> Group: ...
1925

2026
class LabelDecorator:
2127
textAnchor: str

stubs/reportlab/reportlab/graphics/widgetbase.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ class PropHolder:
1515
def dumpProperties(self, prefix: str = "") -> None: ...
1616

1717
class Widget(PropHolder, shapes.UserNode):
18-
# TODO: draw should probably be marked abstract
19-
def draw(self) -> None: ...
20-
def demo(self) -> None: ...
18+
def draw(self): ... # abstract, but not marked as @abstractmethod
19+
def demo(self): ... # abstract, but not marked as @abstractmethod
2120
def provideNode(self) -> shapes.Shape: ...
2221
def getBounds(self) -> tuple[float, float, float, float]: ...
2322

stubs/reportlab/reportlab/platypus/tables.pyi

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from _typeshed import Incomplete
22
from abc import abstractmethod
33
from collections.abc import Collection, Iterable, Sequence
4-
from typing import Any, Literal, overload
4+
from typing import Any, Literal, NamedTuple, overload
55
from typing_extensions import TypeAlias, Unpack
66

77
from reportlab.lib.colors import Color
@@ -55,6 +55,13 @@ class TableStyle:
5555
def add(self, *cmd: Unpack[_RoundedCornersTableCommand]) -> None: ...
5656
def getCommands(self) -> list[_TableCommand]: ...
5757

58+
class ShadowStyle(NamedTuple):
59+
dx: int | Incomplete = 10 # TODO: is either `int` or `float`
60+
dy: int | Incomplete = -10 # TODO: is either `int` or `float`
61+
color0: _Color = "grey"
62+
color1: _Color = "white"
63+
nshades: int = 30
64+
5865
class Table(Flowable):
5966
ident: str | None
6067
repeatRows: int
@@ -89,6 +96,7 @@ class Table(Flowable):
8996
minRowHeights: Sequence[float] | None = None,
9097
cornerRadii: _CornerRadii | _UNSET_ | None = ...,
9198
renderCB: TableRenderCB | None = None,
99+
shadow: ShadowStyle | None = None,
92100
) -> None: ...
93101
def identity(self, maxLen: int | None = 30) -> str: ...
94102
def normalizeData(self, data: Iterable[Iterable[Any]]) -> list[list[Any]]: ...

0 commit comments

Comments
 (0)