Я документирую свой пакет Python с помощью Sphinx. Но я столкнулся с несколькими предупреждениями, и понятия не имею, что делать. Все они встречаются в строках документации на уровне модуля, а не внутри классов или методов.
При попытке собрать документацию на ReadTheDocs я получаю следующую ошибку:
/home/docs/checkouts/readthedocs.org/user_builds/project/checkouts/latest/project/vqe_optimization.py:docstring of project.optimization:1: WARNING: Field list ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/project/checkouts/latest/project/optimization.py:docstring of project.vqe_optimization:1: WARNING: Field list ends without a blank line; unexpected unindent.
/home/docs/checkouts/readthedocs.org/user_builds/project/checkouts/latest/project/optimization.py:docstring of project.vqe_optimization:3: WARNING: Definition list ends without a blank line; unexpected unindent.
Меня это совершенно озадачивает, поскольку моя строка документации выглядит так:
"""Module containing the core Project engine.
Core Project module comprising implementation of the core Project solver
class together with optimizer interfaces etc. The module aims to contain
all the logic behind Project solution, which is not directly connected to
the properties of the electronic structure problem being solved or to the
properties of logically-independent circuits
like an initial orthogonal set or an ansatz.
"""
Вот я совсем озадачен... Что неверно в первой и третьей строке?
В моем conf.py Я использую эти расширения:
extensions = [
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'myst_parser',
'nbsphinx',
'nbsphinx_link',
'sphinx.ext.autodoc'
]
Подробнее здесь: https://stackoverflow.com/questions/789 ... xpected-un
ReadTheDocs Sphinx: ВНИМАНИЕ: список полей заканчивается пустой строкой; неожиданный отступ ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение