Я создал пользовательские классы. Мои файлы Python имеют несколько классов в следующем формате.
class First():
def __init__(arg1, arg2,arg3 ....):
arg1=arg1
arg2=arg2 and so on
"""
:arg1: arg1
:arg2: arg2
"""
def execute():
codes--
class Second():
def __init__(arg1, arg2, arg3 ....):
arg1=arg1
arg2=arg2 and so on
"""
:arg1: arg1
:arg2: arg2
"""
def execute():
codes--
Я добавил строки документации в каждый метод init в обоих классах.
Мой index.rst ниже.
Code document
====================================================
.. toctree::
:maxdepth: 2
:caption: Contents:
Code
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
и code.rst ниже.
Custom Operators Documentation
=====================================
.. automodule:: operators.python_file_name
.. autoclass:: operators.python_file_name.First
Я не получаю сообщение об ошибке, но я получаю веб-сайт без каких-либо аргументов, включая строку документации, которую я добавил в скрипт Python.