I am encountering a number of issues using pyright with the fpdf2 library, specifically with the fpdf.pyi file.
1) There are 4 type aliases to Literal strings: _xxx: TypeAlias = Literal["", ...]
These incorrectly throw errors when a string variable (as opposed to string Literal) is used. Maybe they should just be str??
2) Thecell() and multicell() methods now accept arguments named new_x and new_y. I suspect this package has not been updated in a while to support new/changed functionality in fpdf2. The current version is 2.5.2 and the stubs indicate they are for 2.4.*.
I guess a more general question would be "How do I get 3rd party packages updated?"
I am encountering a number of issues using pyright with the fpdf2 library, specifically with the fpdf.pyi file.
1) There are 4 type aliases to Literal strings:
_xxx: TypeAlias = Literal["", ...]
These incorrectly throw errors when a string variable (as opposed to string Literal) is used. Maybe they should just bestr
??2) The
cell()
andmulticell()
methods now accept arguments namednew_x
andnew_y
. I suspect this package has not been updated in a while to support new/changed functionality in fpdf2. The current version is 2.5.2 and the stubs indicate they are for 2.4.*.I guess a more general question would be "How do I get 3rd party packages updated?"