[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of Polars.
Reproducible example
# polars/dataframe/frame.py
from xlsxwriter import Workbook, Worksheet # Worksheet isn't exposed in xlsxwriter's __init__.py
from xlsxwriter.worksheet import Worksheet # Worksheet just needs to be imported from the worksheet module instead
Log output
N/A
Issue description
I noticed that pyright was complaining about all occurrences of df.write_excel() because the type of "Worksheet" was unknown. Looks like the Worksheet import in the frame.py module just needs to be imported from xlxswriter's worksheet module instead of the top level xlsxwriter namespace. Also, I'm happy to contribute this fix if needed!
Expected behavior
No pyright errors because it is able to resolve the import.
Checks
Reproducible example
Log output
Issue description
I noticed that pyright was complaining about all occurrences of df.write_excel() because the type of "Worksheet" was unknown. Looks like the Worksheet import in the frame.py module just needs to be imported from xlxswriter's worksheet module instead of the top level xlsxwriter namespace. Also, I'm happy to contribute this fix if needed!
Expected behavior
No pyright errors because it is able to resolve the import.
Installed versions