We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
The Raises: section of a Napoleon docstring fails to properly render exceptions when enclosed in the :exc: role and using tildes for short names.
Raises:
:exc:
To Reproduce
>>> from sphinx.ext.napoleon import GoogleDocstring, NumpyDocstring >>> gdocstring = ''' ... Raises: ... foo.bar.Error ... If blah ... ~foo.baz.Error ... If yadda ... :exc:`foo.hoge.Error` ... If naninani ... :exc:`~foo.piyo.Error` ... If nantoka ... ''' >>> print('\n'.join(GoogleDocstring(gdocstring).lines())) :raises foo.bar.Error: If blah :raises ~foo.baz.Error: If yadda :raises foo.hoge.Error: If naninani :raises :exc:`~foo.piyo.Error`: If nantoka >>> ndocstring = ''' ... Raises ... ------ ... foo.bar.Error ... If blah ... ~foo.baz.Error ... If yadda ... :exc:`foo.hoge.Error` ... If naninani ... :exc:`~foo.piyo.Error` ... If nantoka ... ''' >>> print('\n'.join(NumpyDocstring(ndocstring).lines())) :raises foo.bar.Error: If blah :raises ~foo.baz.Error: If yadda :raises foo.hoge.Error: If naninani :raises :exc:`~foo.piyo.Error`: If nantoka
Expected behavior
I expect the final pattern (foo.piyo.Error above) to render like the second one (foo.baz.Error above).
foo.piyo.Error
foo.baz.Error
Environment info
Additional context
The text was updated successfully, but these errors were encountered:
Fix sphinx-doc#6999: napoleon: fails to parse tilde in :exc: role
b14439c
Merge pull request #7003 from tk0miya/6999_napoleon_tilde_in_exc_role
3e03907
Fix #6999: napoleon: fails to parse tilde in :exc: role
Fixed by #7003 . Thank you for reporting.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
The
Raises:
section of a Napoleon docstring fails to properly render exceptions when enclosed in the:exc:
role and using tildes for short names.To Reproduce
Expected behavior
I expect the final pattern (
foo.piyo.Error
above) to render like the second one (foo.baz.Error
above).Environment info
Additional context
The text was updated successfully, but these errors were encountered: