Skip to content

Commit 153c05b

Browse files
authored
[reportlab] Update to 4.5.0 (#15697)
1 parent ac01955 commit 153c05b

4 files changed

Lines changed: 54 additions & 46 deletions

File tree

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.10"
1+
version = "4.5.0"
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/transform.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ def rotate(angle: float, cx: float = 0, cy: float = 0): ...
55
def skewX(angle: float): ...
66
def skewY(angle: float): ...
77
def mmult(A, B): ...
8+
def combineTransforms(*T): ...
89
def inverse(A): ...
910
def zTransformPoint(A, v): ...
1011
def transformPoint(A, v): ...
@@ -19,6 +20,7 @@ __all__ = (
1920
"skewX",
2021
"skewY",
2122
"mmult",
23+
"combineTransforms",
2224
"inverse",
2325
"zTransformPoint",
2426
"transformPoint",

stubs/reportlab/reportlab/lib/colors.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,10 @@ def hue2rgb(m1: float, m2: float, h: float) -> float: ...
290290
def hsl2rgb(h: float, s: float, l: float) -> tuple[float, float, float]: ...
291291
@type_check_only
292292
class _cssParse:
293-
def pcVal(self, v: str) -> float: ...
293+
def pcVal(self, v: str, n: str = "argument") -> float: ...
294294
def rgbPcVal(self, v: str) -> float: ...
295295
def rgbVal(self, v: str) -> float: ...
296+
def floatVal(self, v: str) -> float: ...
296297
def hueVal(self, v: str) -> float: ...
297298
def alphaVal(self, v: str, c: float = 1, n: str = "alpha") -> float: ...
298299
s: str

stubs/reportlab/reportlab/pdfbase/acroform.pyi

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from _typeshed import Incomplete
22
from weakref import ReferenceType
33

4+
from reportlab.lib.colors import Color
45
from reportlab.pdfbase.pdfdoc import PDFDictionary, PDFObject, PDFStream
56

67
__all__ = ("AcroForm",)
@@ -36,6 +37,8 @@ class AcroForm(PDFObject):
3637
extras: dict[Incomplete, Incomplete]
3738
def __init__(self, canv, **kwds) -> None: ...
3839
@property
40+
def useDefault(self) -> object: ...
41+
@property
3942
def canv(self) -> ReferenceType[Incomplete]: ...
4043
def fontRef(self, f) -> str: ...
4144
def format(self, doc) -> bytes: ...
@@ -51,7 +54,7 @@ class AcroForm(PDFObject):
5154
fillColor=None,
5255
borderColor=None,
5356
textColor=None,
54-
borderWidth: int = 1,
57+
borderWidth: int | None = None,
5558
borderStyle: str = "solid",
5659
size: int = 20,
5760
dashLen: int = 3,
@@ -61,8 +64,10 @@ class AcroForm(PDFObject):
6164
def zdMark(self, c, size, ds, iFontName) -> str: ...
6265
def getRef(self, obj): ...
6366
def getRefStr(self, obj) -> str: ...
64-
@staticmethod
65-
def stdColors(t, b, f) -> tuple[Incomplete, Incomplete, Incomplete]: ...
67+
def setDefault(self, name: str, value: Color | float | None) -> None: ...
68+
def getDefaults(
69+
self, textColor, borderColor, fillColor, borderWidth
70+
) -> tuple[Incomplete, Incomplete, Incomplete, Incomplete]: ...
6671
@staticmethod
6772
def varyColors(key, t, b, f) -> tuple[Incomplete, Incomplete, Incomplete]: ...
6873
def checkForceBorder(
@@ -73,10 +78,10 @@ class AcroForm(PDFObject):
7378
checked: bool = False,
7479
buttonStyle: str = "check",
7580
shape: str = "square",
76-
fillColor=None,
77-
borderColor=None,
78-
textColor=None,
79-
borderWidth: int = 1,
81+
fillColor=...,
82+
borderColor=...,
83+
textColor=...,
84+
borderWidth: int = ...,
8085
borderStyle: str = "solid",
8186
size: int = 20,
8287
x: int = 0,
@@ -95,10 +100,10 @@ class AcroForm(PDFObject):
95100
selected: bool = False,
96101
buttonStyle: str = "circle",
97102
shape: str = "circle",
98-
fillColor=None,
99-
borderColor=None,
100-
textColor=None,
101-
borderWidth: int = 1,
103+
fillColor=...,
104+
borderColor=...,
105+
textColor=...,
106+
borderWidth: int = ...,
102107
borderStyle: str = "solid",
103108
size: int = 20,
104109
x: int = 0,
@@ -123,7 +128,7 @@ class AcroForm(PDFObject):
123128
fillColor=None,
124129
borderColor=None,
125130
textColor=None,
126-
borderWidth: int = 1,
131+
borderWidth: int | None = None,
127132
borderStyle: str = "solid",
128133
width: int = 120,
129134
height: int = 36,
@@ -138,10 +143,10 @@ class AcroForm(PDFObject):
138143
def textfield(
139144
self,
140145
value: str = "",
141-
fillColor=None,
142-
borderColor=None,
143-
textColor=None,
144-
borderWidth: int = 1,
146+
fillColor=...,
147+
borderColor=...,
148+
textColor=...,
149+
borderWidth: int = ...,
145150
borderStyle: str = "solid",
146151
width: int = 120,
147152
height: int = 36,
@@ -161,10 +166,10 @@ class AcroForm(PDFObject):
161166
def listbox(
162167
self,
163168
value: str = "",
164-
fillColor=None,
165-
borderColor=None,
166-
textColor=None,
167-
borderWidth: int = 1,
169+
fillColor=...,
170+
borderColor=...,
171+
textColor=...,
172+
borderWidth: int = ...,
168173
borderStyle: str = "solid",
169174
width: int = 120,
170175
height: int = 36,
@@ -185,10 +190,10 @@ class AcroForm(PDFObject):
185190
def choice(
186191
self,
187192
value: str = "",
188-
fillColor=None,
189-
borderColor=None,
190-
textColor=None,
191-
borderWidth: int = 1,
193+
fillColor=...,
194+
borderColor=...,
195+
textColor=...,
196+
borderWidth: int = ...,
192197
borderStyle: str = "solid",
193198
width: int = 120,
194199
height: int = 36,
@@ -212,10 +217,10 @@ class AcroForm(PDFObject):
212217
checked: bool = False,
213218
buttonStyle: str = "check",
214219
shape: str = "square",
215-
fillColor=None,
216-
borderColor=None,
217-
textColor=None,
218-
borderWidth: int = 1,
220+
fillColor=...,
221+
borderColor=...,
222+
textColor=...,
223+
borderWidth: int = ...,
219224
borderStyle: str = "solid",
220225
size: int = 20,
221226
x: int = 0,
@@ -234,10 +239,10 @@ class AcroForm(PDFObject):
234239
selected: bool = False,
235240
buttonStyle: str = "circle",
236241
shape: str = "circle",
237-
fillColor=None,
238-
borderColor=None,
239-
textColor=None,
240-
borderWidth: int = 1,
242+
fillColor=...,
243+
borderColor=...,
244+
textColor=...,
245+
borderWidth: int = ...,
241246
borderStyle: str = "solid",
242247
size: int = 20,
243248
x: int = 0,
@@ -253,10 +258,10 @@ class AcroForm(PDFObject):
253258
self,
254259
*,
255260
value: str = "",
256-
fillColor=None,
257-
borderColor=None,
258-
textColor=None,
259-
borderWidth: int = 1,
261+
fillColor=...,
262+
borderColor=...,
263+
textColor=...,
264+
borderWidth: int = ...,
260265
borderStyle: str = "solid",
261266
width: int = 120,
262267
height: int = 36,
@@ -276,10 +281,10 @@ class AcroForm(PDFObject):
276281
self,
277282
*,
278283
value: str = "",
279-
fillColor=None,
280-
borderColor=None,
281-
textColor=None,
282-
borderWidth: int = 1,
284+
fillColor=...,
285+
borderColor=...,
286+
textColor=...,
287+
borderWidth: int = ...,
283288
borderStyle: str = "solid",
284289
width: int = 120,
285290
height: int = 36,
@@ -299,10 +304,10 @@ class AcroForm(PDFObject):
299304
self,
300305
*,
301306
value: str = "",
302-
fillColor=None,
303-
borderColor=None,
304-
textColor=None,
305-
borderWidth: int = 1,
307+
fillColor=...,
308+
borderColor=...,
309+
textColor=...,
310+
borderWidth: int = ...,
306311
borderStyle: str = "solid",
307312
width: int = 120,
308313
height: int = 36,

0 commit comments

Comments
 (0)