I'm documenting my library with Sphinx. And I have decorator logic_object
:
class logic_object:
"""Decorator for logic object class.
"""
def __init__(self, cls):
self.cls = cls
self.__doc__ = self.cls.__doc__
And I have gravity
class that decorated by logic_object
:
@logic_object
class gravity:
"""Basic gravity object logic class.
:param float g: pixels of acceleration
:param float jf: jump force
"""
#There is more not important code.
My Sphinx .rst
file is:
Mind.Existence
========================
Classes, methods and functions marked with * aren't for usual cases, they are made to help to the rest of the library.
.. automodule:: Mind.Existence
:members:
:member-order: bysource
logic_object
gets documented with autodoc
, but gravity
doesn't.
Why this happens and how to fix it?