-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix validation error type PR02
and check in CI
#25376
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'll work on that if no objection! |
Yes, please do @nickagian. :) |
Ok, I'd like some help. There are many cases that have the same root cause but I don't know how to solve this. It happens when a method gets delegated from a class to another. Usually by using the The problem is that the new class gets a method Any ideas on how to solve this? I thought perhaps of passing also the desired docstring to the decorator instead of using the one from the original class, but I am not sure if that is a good idea. |
@nickagian do you have an example of a method that is failing this check? |
Found one, |
@TomAugspurger Yes exactly, or |
If you're interested,
https://github.com/pandas-dev/pandas/blob/fe1654faa86836a0007bb513504e57c5c9935b8b/pandas/util/_decorators.py#L200-L215
provides an example of rewriting signatures. But I wouldn't include this
under "Good first issue" :)
…On Wed, Feb 27, 2019 at 3:12 PM nickagian ***@***.***> wrote:
@TomAugspurger <https://github.com/TomAugspurger> Yes exactly, or
pandas.CategoricalIndex.rename_categories and many more.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#25376 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIrPwKjT-hWiDu7oawsiXQ_rmrNCAks5vRvTbgaJpZM4bDoBQ>
.
|
I have another question, regarding the This is wrong if applied directly to a class, since f is only a function not bound to any object yet. Thus, the check we do here will give False anyways. This creates a family of PR02 errors, for example for My question is: Is there a way to do this check correctly? The only drawback is we have to provide the method names in the |
Closing as a duplicate of #27976 |
Problem description
In order to have a continuous check by the CI on validation error
PR02
(Unknown parameters), fixing them in the code base enables the addition to the CI for automated testing in the future.Please see overview of the errors.
Todo:
code_check.sh
script to take into account thePR02
type of errorsThe text was updated successfully, but these errors were encountered: