Conversation
…odules refactor: enhance type hints across format, workbook, and worksheet modules refactor: enhance type hints across format, workbook, and worksheet modules
|
Do you accept PRs that don't have a comprehensive approach? Or what do I need to do to get the PR accepted? |
|
Overall it looks good. I'll try to include it in the next release. |
|
BTW, do you have any specific reason for adding these, apart from just increasing the type information in XlsxWriter? Linked to #1123 |
|
Yes, I use this library in my code. |
| return self._add_sheet(name, worksheet_class=chartsheet_class) | ||
|
|
||
| def add_format(self, properties=None) -> Format: | ||
| def add_format(self, properties: Optional[Dict[str, Any]] = None) -> Format: |
There was a problem hiding this comment.
Perhaps it would make sense here to accept not just a string as the key, but a list of literals (fields from the Format class)? What do you think? @jmcnamara
|
Please tell me, do you want to add anything else before merging this PR? |
|
Another question: as you know, Python 3.9 has reached end of life. Can I make a separate PR where the minimum Python version will be 3.10 (while updating the annotations to the newer version)? Or are you planning to keep support for Python 3.8 and 3.9? |
No. It looks fine. I just have a backlog of other things to get through first. |
I don't usually rush to deprecate older Python version support unless there is a good reason but I would like to be able to use the |
Adds a few type annotations that may be useful.