Skip to content

TYP: Add types for excel writer classes #45246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2022
Merged

Conversation

phofl
Copy link
Member

@phofl phofl commented Jan 7, 2022

No description provided.

@@ -8,7 +8,7 @@
)

import pandas._libs.json as json
from pandas._typing import StorageOptions
from pandas._typing import StorageOptions, FilePath, WriteExcelBuffer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isort complaints

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had some issues with pre commit yesterday, will fix

@@ -453,6 +459,8 @@ def write_cells(
self.sheets[sheet_name] = wks

if validate_freeze_panes(freeze_panes):
# for mypy
assert freeze_panes is not None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if its been discussed, but i think we should move away from the assert-for-mypy pattern, since with cast/ignore mypy will alert us when it is no longer necessary

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will use cast then

@jreback jreback added IO Excel read_excel, to_excel Typing type annotations, mypy/pyright type checking labels Jan 8, 2022
@jreback jreback added this to the 1.5 milestone Jan 10, 2022
@jreback jreback merged commit d3c62ad into pandas-dev:master Jan 10, 2022
@phofl phofl deleted the typ_excel branch January 28, 2022 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Excel read_excel, to_excel Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants