[Python] ReadTheDocs Sphinx: WARNING: Field list ends without a blank line; unexpected unindent

Discussão em 'Python' iniciado por Stack, Setembro 16, 2024.

  1. Stack

    Stack Membro Participativo

    I'm documenting my Python package using Sphinx. But I've come across several warnings I have no idea, what to do about. All of them are occurring in my module-level docstrings, not inside of classes or methods.

    When trying to build my documentation on ReadTheDocs I'm getting the following error:

    /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.


    I'm completely puzzled by this, as my docstring looks like this:

    """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.
    """


    Here I'm completely puzzled... What is incorrect at the first and third line?

    In my conf.py I'm using these extensions:

    extensions = [
    'sphinx.ext.viewcode',
    'sphinx.ext.napoleon',
    'myst_parser',
    'nbsphinx',
    'nbsphinx_link',
    'sphinx.ext.autodoc'
    ]

    Continue reading...

Compartilhe esta Página