-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
CI: Improve API of --ignore_errors in validate_docstrings.py #57908
CI: Improve API of --ignore_errors in validate_docstrings.py #57908
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably overly safe, but one could verify that only one CLI parameter is specifying globally ignored errors, otherwise one set would overwrite the other
It shouldn't overwrite it, I'm not sure if I explicitly tested it, but the way I implemented was to allow to do ignore_errors[None].update(set(error_codes.split(","))) What I don't check is if there are duplicates, but that's not likely going to be useful since we just have one error being fully ignored, and I don't think we'll be adding any or many more errors to the script. What I'm not sure is what happens if an object (e.g. |
Thanks @datapythonista |
Thanks for all the work on this @datapythonista! |
Yes, no more changes to the ignore functions in |
Opened DOC: Enforce Numpy Docstring Validation (Parent Issue) #58063 as a parent issue for fixing docstrings based on the refactoring in code_checks.sh Feel free to swing by and help out! 🙂 |
…dev#57908) * CI: Improve API of --ignore_errors in validate_docstrings.py * Updating tests
Follow up of #57879, to use
--ignore_errors PR02,SA01
instead of--ignore_errors * PR02,SA01
.I also make the script ignore the specified errors when running for a single document (i.e.
validate_docstrings.py pandas.Series -i SA01
was reporting the SA01 error before this PR, and it won't with the changes here).CC: @mroeschke