【发布时间】:2015-12-26 00:24:42
【问题描述】:
我正在用 Sphinx 记录我的图书馆。我有装饰师logic_object:
class logic_object:
"""Decorator for logic object class.
"""
def __init__(self, cls):
self.cls = cls
self.__doc__ = self.cls.__doc__
我有gravity 类,由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.
我的 Sphinx .rst 文件是:
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 使用 autodoc 记录,但 gravity 没有记录。
为什么会发生这种情况以及如何解决?
【问题讨论】:
标签: python python-sphinx python-decorators autodoc