-
-
Notifications
You must be signed in to change notification settings - Fork 167
numpydoc.validate fails on the reference docstring example #242
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
After #243 the following checks still fail,
I think it would make sense disable GL01 and make the others optional (or maybe address RT03 in the example). |
I guess we got GL01 wrong, but the rest, more than contradicting we just wanted to be more strict. Since I'm ok to have a |
You right, the question is not about contraditing but being more string. For large OSS projects, it definitely makes sense to use the strict rules. However, in other use cases (e.g. smaller projects) having it less strict could be useful. For instance, I don't necessarily want to add an example for each function in my side project, and the docstring linter shouldn't fail because of it in that case. Of course one could skip those on the user side, but since the same ones happen repeatedly, maybe we could do something about it in numpydoc. |
I think users of the function should just cull the list afterward. It's flexible and pretty easy. For the command line let's discuss in #240. But something like |
I think we all agree. Being able to ignore errors is something we surely want. Even when being strict, fixing all errors will take time and we'll want to ignore some while being fixed. My only point is that I'd prefer to keep the function that validates as is without that, since there is already a decent amount of complexity there. And implement the ignoring in the caller. If there could be a speed gain it could make more sense, but I think it'll take around the same time to validate everything and ignore errors that we don't care about, than ignore them beforehand. |
The recently added
numpydoc.validate
functionality fails on the reference docstring indoc/example.py
.It seems the validator is contradicting some of the docstring formatting rules (e.g. #241)
cc @datapythonista @jnothman @larsoner
The text was updated successfully, but these errors were encountered: