sphinx-autodoc2 icon indicating copy to clipboard operation
sphinx-autodoc2 copied to clipboard

Wrong line shown in WARNING

Open Gabriel-p opened this issue 9 months ago • 0 comments

The small project explained below shows this warning message when built with sphinx-build -M html . _build:

WARNING: /home/gabriel/Descargas/sphinx_temp/docs/testpack/test.py:-27: (WARNING/2) Inline literal start-string without end-string. [docutils]

Line -27 is clearly wrong. I'm not sure if this is related to this package or Sphinx because it says [docutils] at the end...


.
└── docs
    ├── conf.py
    ├── index.rst
    ├── make.bat
    ├── Makefile
    └── testpack
        ├── __init__.py
        └── test.py

conf.py

#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'test'
copyright = '2025, me'
author = 'me'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
    "autodoc2",
]

autodoc2_packages = [
    {
        "path": "testpack",
    }
]
autodoc2_hidden_objects = ["dunder", "private", "inherited"]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']

index.rst

.. test documentation master file, created by
   sphinx-quickstart on Sat Jan 11 11:47:15 2025.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

test documentation
==================

Add your content using ``reStructuredText`` syntax. See the
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
documentation for details.


.. toctree::
   :maxdepth: 2
   :caption: Contents:

   apidocs/index

init.py

from .test import TestClass as testclass

__all__ = ["testclass"]

test.py


class TestClass:
    """ """

    def __init__(
        self,
    ) -> None:
        """Missing tick right here: ``N_runs`"""
        return

Gabriel-p avatar Jan 11 '25 15:01 Gabriel-p