-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
How to specify numpydoc_validation_checks from CLI #459
Comments
The problem here is that no config is being passed onto the validator when |
Oh ok if so it seems an easy fix, I can try and make a PR if you want |
I don't maintain this project, but I'm looking into how to do something similar. You'll find that the function |
See also #467 - there is indeed a difference in the (now) 3 interfaces to the validation functionality (cli, pre-commit, and sphinx-build). #476 should help, but there will still be room for improvement. Ultimately I think there's an opportunity to refactor the validation to make it more modular - one of the big disadvantages currently is that all the validation checks run regardless of configuration - the configuration just dictates what's reported. |
From the docs it is not clear if this is possible and my first tries failed.
If I do
python -m numpydoc -h
I see,and from the docs I see e.g. the
numpydoc_use_plots
configuration option mentioned in the help example.I would like to specify the equivalent of e.g.
numpydoc_validation_checks = {"all", "GL01", "GL02", "GL05"}
- is this possible?If not it should be explained, if yes I think there should be more examples of usage.
I tried e.g.,
python -m numpydoc -c numpydoc_validation_checks=all -c numpydoc_validation_checks=GL01 -c numpydoc_validation_checks=GL02 -c numpydoc_validation_checks=GL05 --validate test_module.good_docstring
and
python -m numpydoc -c numpydoc_validation_checks{"all", "GL01", "GL02", "GL05"} --validate test_module.good_docstring
The text was updated successfully, but these errors were encountered: