You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating documentation for class with decorators, Sphinx recognizes the wrapped class as the wrapper function returned by the top decorator instead of the actual class being wrapped by decorators.
I confirmed the behaviour. At runtime, Singleton is a function and not a class anymore and it appears we do not statically analyze the decorated class before choosing the correct documenter. I think the reason why it's like this is because the documenter being involved is the one for documenting functions (since the runtime type is a function) and not a class anymore; however, IIRC, the documenter is determined before the module is statically analyzed...
Describe the bug
When generating documentation for class with decorators, Sphinx recognizes the wrapped class as the wrapper function returned by the top decorator instead of the actual class being wrapped by decorators.
How to Reproduce
index.rst
test_sphinx.py
Environment Information
Sphinx extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: