Skip to content
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

Literal "calamine" missing from ExcelFile engine attribute #1061

Closed
sanzoghenzo opened this issue Nov 29, 2024 · 1 comment · Fixed by #1062
Closed

Literal "calamine" missing from ExcelFile engine attribute #1061

sanzoghenzo opened this issue Nov 29, 2024 · 1 comment · Fixed by #1062
Labels
IO Excel read_excel, to_excel

Comments

@sanzoghenzo
Copy link
Contributor

Describe the bug

#898 missed the engine attribute of the ExcelFile class.

To Reproduce

import pandas as pd

with pd.ExcelFile("path.xlsx", engine="calamine") as xlsx:
   pass

using mypy I got

error: Argument "engine" to "ExcelFile" has incompatible type "Literal['calamine']"; expected "Literal['xlrd', 'openpyxl', 'odf', 'pyxlsb'] | None"  [arg-type]

Please complete the following information:
I don't think it matters, but:

  • OS: Windows 10 22H2
  • python v3.10
  • mypy v1.13.0
  • pandas-stubs v2.2.3.241126
@loicdiridollou loicdiridollou added the IO Excel read_excel, to_excel label Nov 29, 2024
@loicdiridollou
Copy link
Contributor

That is correct, it was missed there! Seems like a small addition to be made in the pandas-stubs/io/excel/_base.pyi. Open to PR with tests in tests/test_io.py.

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants