-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Make numpydoc lint --ignore ...
parsing more robust
#560
base: main
Are you sure you want to change the base?
Conversation
Before, the only way to specify ignores is as: numpydoc lint filename --ignore EX01 SA01 and multiple invocations of the ignore flag overwrote one another. Instead, ignored checks are now specified as: numpydoc lint --ignore=EX01,SA01 filename The comma can also be whitespace: numpydoc lint --ignore="EX01 SA01" filename Multiple ignore flags work correctly: numpydoc lint --ignore EX01 --ignore SA01 filename
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.
LGTM, though @stefmolin 's opinion would be the most valuable. Thanks @stefanv !
I should note that this is backward incompatible (but I don't think we've made a release with the
needs to be rewritten as any of the following:
|
I'm traveling now, but I will take a look when I'm back later this week. |
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.
Functionality works as expected. I think we are missing a test case for this though (I left a suggestion).
@@ -100,8 +101,6 @@ def _parse_config(s): | |||
) | |||
lint_parser.add_argument( | |||
"--ignore", | |||
type=str, | |||
nargs="*", | |||
help=( |
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.
I think we should indicate how this can be used in the help now that there are multiple options.
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.
@stefanv WDYT?
Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
Before, the only way to specify ignores is as:
and multiple invocations of the ignore flag overwrote one another.
Instead, ignored checks are now specified as:
The comma can also be whitespace:
Multiple ignore flags work correctly:
@stefmolin Would you be willing to take a look?