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
autodoc_typehints='signature' doesn't handle None #7428
Comments
+1; Reasonable. |
Note that if I use <dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.8)">None</a></p>
</dd> That is, it generates a clickable link to the |
Fix #7428: py domain: a reference to class ``None`` emits a nitpicky warning
Fixed by #7432 @godlygeek I think it is another topic. So please file another issue. Thanks, |
Describe the bug
Given a Python file containing:
And a
conf.py
containing:The latest Sphinx installed from PyPI generates:
And then winds up generating a warning, if
-n
is enabled:Which of course fails the build if
-W
is enabled.This works fine if the return type is
int
instead ofNone
- I'm guessing that the issue is the type is resolved usingpy:class
, but thatNone
is special, as per PEP-484:To Reproduce
Expected behavior
Documentation generation completes without an error, and includes a link to https://docs.python.org/3/library/constants.html#None
Environment info
Additional context
Appears to have been introduced in 3.0.0; our CI had no issue with the latest version on PyPI as of Friday.
The text was updated successfully, but these errors were encountered: