Any planned support for types?

50 views
Skip to first unread message

Tom Parker-Shemilt

unread,
Aug 4, 2024, 4:20:01 PM8/4/24
to reportlab-users
Is there any planned support for types in reportlab? I was trying to setup pyright with a reportlab project and I'm getting errors like

error: Type of "circle" is partially unknown
    Type of "circle" is "(x_cen: Unknown, y_cen: Unknown, r: Unknown, stroke: int = 1, fill: int = 0) -> None" (reportUnknownMemberType)

Some of the funcs it's able to infer the types for, but others like Canvas.circle, not so much.

Thanks,

Tom

MaKaNufilms

unread,
May 15, 2026, 4:48:08 AMMay 15
to reportlab-users
I think this goes in the same category as my issue: https://groups.google.com/g/reportlab-users/c/y0-mnp53lF8/m/Akxc4hzeCQAJ

From what I see type support exists (the typechecker is unhappy about float since it expects int), but is not fully completed yet.

Robin Becker

unread,
May 22, 2026, 8:30:54 AMMay 22
to reportlab-users
Hi, we did not make the types-reportlab stubs package which is in pypi.org. If we decide to add types I imagine we would put the typing code inline. Andy Robinson uses pycharm I think so he would benefit. I have done most of the maintenance / improvements etc etc and I use vim; it's quite hard to get good typeing going on in vi/vim so types is just noise for me.

So I think it's unlikely that type will appear soone unless I break the habit of 50+ years and start using z
Reply all
Reply to author
Forward
0 new messages