Skip to content

Wrong line shown in WARNING #82

Open
@Gabriel-p

Description

@Gabriel-p

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Gabriel-p

        Issue actions

          Wrong line shown in WARNING · Issue #82 · sphinx-extensions2/sphinx-autodoc2