Skip to content

Conversation

zhaxnb
Copy link

@zhaxnb zhaxnb commented Aug 14, 2024

@zhaxnb zhaxnb requested a review from rhshadrach as a code owner August 14, 2024 03:54
@zhaxnb zhaxnb changed the title fix: type error when exportng file as bytes fix: type error when exporting file as bytes Aug 14, 2024
@rhshadrach
Copy link
Member

Thanks for the PR! It seems to me that WriteExcelBuffer was should have io.BytesIO as a subtype, is this not the case?

@rhshadrach rhshadrach added Typing type annotations, mypy/pyright type checking IO Excel read_excel, to_excel labels Aug 14, 2024
@zhaxnb
Copy link
Author

zhaxnb commented Aug 15, 2024

No, while it seems to be a subtype, it doesn't actually work.
before
image
image
I tried. It's the best solution I've got. line 1242
after
image
image

@rhshadrach
Copy link
Member

No, while it seems to be a subtype, it doesn't actually work.

I'm against adding unnecessary type-hints to make IDEs happy. If it is a subtype, then the IDE should be fine with it and this is an issue with the IDE, not pandas.

@zhaxnb
Copy link
Author

zhaxnb commented Aug 19, 2024

Okay, I'll double-check if it's an IDE problem.

@zhaxnb zhaxnb closed this Aug 20, 2024
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.

2 participants