Sphinx ignores decorated functions such as `@solid` due to missing signature
See original GitHub issueProblem: When documenting a codebase that contains functions decorated with @solid
(or other dagster decorators), the functions are not
picked up by automodule
, i.e. they are not documented.
Cause: The reason for this behaviour is that sphinx looks for the doc
attribute which must be copied if a function is decorated.
Fix: Copying the doc
attribute, e.g. by using functools
or dynamically creating a doc
attribute.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Preserve default arguments of wrapped/decorated Python ...
If my module is imported by Sphinx my wrappers return the original functions instead of wrapping them. Thus, the signature is preserved. python...
Read more >9976 (Decorated functions/methods have generic signature in ...
I am currently working on a related problem, namely a Cython version of the cached_method decorators - see #11115. Why is that related?...
Read more >What's New In Python 3.3 — Python 3.11.1 documentation
A new function inspect.signature() makes introspection of python callables easy and straightforward. A broad range of callables is supported: python functions, ...
Read more >Considerations in adopting RHEL 8 Red Hat Enterprise Linux 8
Software FCoE and Fibre Channel no longer support the target mode; 12.2.9. ... two parameters and with any functions decorated with attribute alloc_size...
Read more >Changelog — pytest documentation
The affected features will be effectively removed in pytest 7.1, ... Before, such tests were silently skipped, and the positional argument ignored.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there a resolution on documentation? We use autodoc and I’m not sure where to add @muthugit suggestion of autofunction. This is certainly a big missing feature for us as all solids are excluded from our documentation.
@muthugit Great to know that works. I wonder if docs can become automatic with automodule as well.