-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Type checking with converters=
on read_excel
#849
Comments
Thanks for the report. I think this is a pyright issue, because the following code reports a similar error: from functools import partial
from typing import Callable
basetwo = partial(int, base=2)
def foo(func: Callable[[object], object], value: str):
print(func(value))
foo(basetwo, "1011") Created an issue for Will leave this open pending feedback there. |
Based on the discussion with pyright, it looks like the proper fix is to change PR with tests welcome. |
I can look to make that change, would it also be worth looking at the other io methods that use converters and see if they need to be changed also? |
Sure, but you'll have to see if the API is consistent across the other API's. I did see that we have Also, now that I think about it, for the Excel case, the right argument type might be |
Describe the bug
Pyright doesn't seem to like something about using
converters=...
withread_excel
To Reproduce
pandas
example that is not properly checked by the stubs.mypy
orpyright
).: Bothmypy:
pyright:
Please complete the following information:
3.10.12
pyright==1.1.345
,mypy==1.8.0
pandas-stubs
:pandas_stubs==1.4.4.220919
(also present on latest pandas_stubs version for most recent pandas version)Additional context
Not sure if its something with the converters type or read_excel, but using a lambda instead of partial results in both type checkers not liking it even though
read_csv
has no issue with either ieThe text was updated successfully, but these errors were encountered: