-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Stubtest: option to ignore "runtime does not have argument" when implementation accepts *args/**kwargs #13305
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
Comments
I assume you're referring to errors like the following?
stubtest does actually handle decorators and args / kwargs mostly well. The issue is that
stubtest's output^ is confusing, but it basically is reporting errors twice, once when checking whether positional args match and once when checking whether keyword-only args match:
If I were to fix the duplication, you'd still get the following (because
|
Thank you, that makes sense that it errors because of the arguments not being keyword-only! I focused only on the many "runtime does not have argument" warnings which did not seem very intuitive. |
Avoid issuing duplicate errors for keyword-only mismatches. Fixes python#13305 Fix cases where PEP 570 is used in the stub
#13307 will fix the duplicate error, so will just say:
|
Avoid issuing duplicate errors for keyword-only mismatches. Fixes #13305 Fix cases where PEP 570 is used in the stub
Feature
Pandas uses many decorators. Some of them change the function signature, e.g.,
@deprecate_nonkeyword_arguments(...)
exposes a function that accepts*args, **kwargs
instead of the original function. It would be nice to have an option to suppress "runtime does not have argument"-warnings when the implementation accepts *args/**kwargs.Pitch
Add an option to deal with decorators or args/kwargs.
@hauntsaninja
The text was updated successfully, but these errors were encountered: