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
When documenting a functools.cache_property, the type hint is not shown.
functools.cache_property
I have a class that has a number of functools.cached_property methods.
functools.cached_property
Both through :members: as well as through autoproperty, I am unable to have them show their type hint.
:members:
autoproperty
To doublecheck, I turned some of them into regular property methods, and their type hint does get shown.
property
functools.cached_property methods should show their typehint.
x-special/nautilus-clipboard copy file:///home/ldt/Projects/mde3/exportit/sphinx.zip
At the top, I changed it to a regular property, at the bottom I left it as a functools.cached_property.
Linux Ubuntu 20.0.4
3.9.6
4.1.1
autodoc
No response
The text was updated successfully, but these errors were encountered:
Oops, that upload failed...
sphinx.zip
Sorry, something went wrong.
Could you let me know the way to build this example? It seems some additional libraries are needed.
I reproduced the error with following code:
from functools import cached_property class Foo: @property def prop1(self) -> int: """docstring""" return 0 @cached_property def prop2(self) -> int: "docstring"
65c089b
Merge pull request #9488 from tk0miya/9487_typehint_for_cached_property
43528da
Fix #9487: autodoc: typehint for cached_property is not shown
No branches or pull requests
Describe the bug
When documenting a
functools.cache_property
, the type hint is not shown.How to Reproduce
I have a class that has a number of
functools.cached_property
methods.Both through
:members:
as well as throughautoproperty
, I am unable to have them show their type hint.To doublecheck, I turned some of them into regular
property
methods, and their type hint does get shown.Expected behavior
functools.cached_property
methods should show their typehint.Your project
x-special/nautilus-clipboard copy file:///home/ldt/Projects/mde3/exportit/sphinx.zip
Screenshots
At the top, I changed it to a regular
property
, at the bottom I left it as afunctools.cached_property
.OS
Linux Ubuntu 20.0.4
Python version
3.9.6
Sphinx version
4.1.1
Sphinx extensions
autodoc
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: