-
-
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
BUG: Object references that start with a tilde in "See Also" section cause a ValueError
#519
Comments
ValueError
ValueError
I get a similar error for docstrings that contain reStructuredText substitutions (where I'm making use of sphinxcontrib-globalsubs):
Thank you again! |
Another example at https://github.com/numpy/numpy/pull/25416/files#r1434392613 - the validator failed on a |
EDIT: submitted #558 but this only handles the case of the sphinx cross-references. Similarly I'm having issues with cross-references. See issue for more detail: pyqtgraph/pyqtgraph#3028 (comment) This blows up: See Also
---------
:meth:`QImage.save <QImage.save>` :
... This is ok (but the rendered result doesn't include the class name which is what I wanted). See Also
---------
:meth:`QImage.save` :
... In case it helps, here's the full traceback:
|
Description
When I ran the docstring validator on a docstring with a "See Also" section that contains an object reference starting with a tilde, I got a
ValueError
that caused the validator to crash.This might be related to #232.
Expected behavior
Ideally, an object reference starting with a tilde would be recognized as valid.
Otherwise, if a "See Also" section is not able to be parsed, the validator would ideally keep running and instead report the problem with a specific error code.
It would also have been helpful for the traceback to say which file the error occurred in.
Minimum reproducible example
Using numpydoc 1.6.0:
When I run
validate-docstrings
on a file containing this function/docstring, then I get the following error:Thank you!
The text was updated successfully, but these errors were encountered: