-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Incorrect "Type application has too few types" when constructing generic Series type #471
Comments
Why are you using Series from pandera? I think you might be in the wrong repo, as I don't think we support anything other than direct pandas use. |
Well, I'm using pandera, which uses pandas-stubs, and I'm claiming a regression in pandas-stubs has broken pandera. Exactly like it was broken for pandera's DataFrame type in #197. Here's a repro that doesn't involve pandera, hacked together from @cosmicBboy's repro in #197. It's mypy-happy with pandas-stubs 1.5.2.221124 and mypy-unhappy with 1.5.2.221213 (same error as above).
|
Can you write a reproducer using only pandas and not subclasses? |
No, I don't think so. Reading #197 more carefully I see that (assuming it's similar) it's caused by a mypy issue (python/mypy#13437 ). However, previously (#197) @Dr-Irv seemed happy to mitigate this with a change in pandas-stubs to avoid breaking pandera. Would be really helpful if a similar thing could be done here. |
My current hypothesis on this is as follows:
My sense now is that when we find the commit, it will be an innocuous change. I think the fundamental issue will be that to declare |
|
or
cause mypy to produce errors like
error: Type application has too few types (2 expected) [misc]
Please complete the following information:
Additional context
May be similar/same issue as #197 but for Series rather than DataFrames?
The text was updated successfully, but these errors were encountered: