MaKaNufilms
unread,May 15, 2026, 4:44:56 AM (4 days ago) May 15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to reportlab-users
I discovered two small type hinting issues in python library:
from reportlab.lib.units import mm
from reportlab.graphics.barcode.qr import QrCodeWidget
qr = QrCodeWidget("Test")
qr.x = 1 * mm
This creates:
Cannot assign to attribute "x" for class "QrCodeWidget"
"float" is not assignable to "int"
I would assume that float for a coordinate value is fine and should be accepted.
The same goes for qr.y.
from reportlab.lib import colors
from reportlab.graphics.shapes import Rect
rect = Rect(
0, 0, 20, 20,
fillColor=colors.transparent,
strokeColor=colors.red
)
This results in:
Argument of type "Color" cannot be assigned to parameter "fillColor" of type "_SolidShapeKwArgs" in function "__init__"
"Color" is not assignable to "_SolidShapeKwArgs"
For both color entries.
The code works perfectly fine, just the types are incorrect.