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
The @op decorator returns an instance of the class Op, so that a function thus decorated is a module-level object that is neither of Class nor function type. It is therefore ignored by sphinx.ext.autodoc.
One workaround consists in explicitly instructing autodoc to include the decorated function by adding the following statement to the module's docstring:
.. autodata:: function_name
:annotation:
This would however require the decorator to copy the docstring of the wrapped function onto the Op instance it returns.
The text was updated successfully, but these errors were encountered:
The docstring is now correctly copied (#19). Discovery of the callable instances by Sphinx lies outside of the scope of the library, thus I'm closing the issue.
The
@op
decorator returns an instance of the classOp
, so that a function thus decorated is a module-level object that is neither ofClass
norfunction
type. It is therefore ignored by sphinx.ext.autodoc.One workaround consists in explicitly instructing autodoc to include the decorated function by adding the following statement to the module's docstring:
This would however require the decorator to copy the docstring of the wrapped function onto the
Op
instance it returns.The text was updated successfully, but these errors were encountered: