pyopenxl: CellRange
: title
should not be required
#10682
Labels
stubs: false positive
Type checkers report false errors
CellRange
: title
should not be required
#10682
#10563 introduced type annotations for
title
inCellRange
(thanks!).Unfortunately, it made it required in one of the overloads.
I don't think
title
should be required.Discussion
A comment in the stub provides a justification for making it required:
However,
__str__
works fine if title is none:I haven't found any other place in the
CellRange
source where title =None
would be causing problems.It is apparently treated as equivalent to an empty string.
Example
This passed all checks with Pyright 1.1.324. But Pyright 1.1.326 (which includes the latest rev of typeshed) reports:
Workaround
Set title to an empty string.
The text was updated successfully, but these errors were encountered: