sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.55k stars 2.12k forks source link

Inline interpreted text or phrase reference start-string without end-string. #12805

Open IamJasonBoy opened 2 months ago

IamJasonBoy commented 2 months ago

Describe the bug

class AlgoDeliverEnum(IntEnum):
    """
    Algorithm Deliver Enum.
    """

    DeliverWhite = 0
    DeliverBlack = 1
    DeliverGray = 2

/xxxxxx/AlgoDeliverEnum.rst:12:Inline interpreted text or phrase reference start-string without end-string.

Error report with no clue!!!

How to Reproduce

Error report with no clue!!!

Environment Information

sphinx-copybutton             0.5.2
sphinx-gallery                0.17.1
sphinx-rtd-theme              1.1.1
sphinxcontrib-applehelp       1.0.8
sphinxcontrib-devhelp         1.0.6
sphinxcontrib-htmlhelp        2.0.5
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.7
sphinxcontrib-serializinghtml 1.1.10

python3 3.12

Sphinx extensions

No response

Additional context

No response

electric-coder commented 2 months ago

I don't think you're giving us enough information. You don't include the .rst, there should be a line 12 from the error message but there aren't 12 lines in the code you included:

AlgoDeliverEnum.rst:12:

Also, the example you included is Python code not reStructuredText code. So you should put Python code in .py.

IamJasonBoy commented 2 months ago
aidisdk.algo\_house.algorithm\_module.AlgoDeliverEnum
=====================================================

.. currentmodule:: aidisdk.algo_house.algorithm_module

.. autoclass:: AlgoDeliverEnum
   :members:
   :show-inheritance:
   :inherited-members:

   .. automethod:: __init__

   .. rubric:: Methods

   .. autosummary::

      ~AlgoDeliverEnum.__init__
      ~AlgoDeliverEnum.as_integer_ratio
      ~AlgoDeliverEnum.bit_count
      ~AlgoDeliverEnum.bit_length
      ~AlgoDeliverEnum.conjugate
      ~AlgoDeliverEnum.from_bytes
      ~AlgoDeliverEnum.is_integer
      ~AlgoDeliverEnum.to_bytes
nzw0301 commented 2 days ago

I think https://stackoverflow.com/questions/77914856/sphinx-raises-warnings-for-class-derived-from-intenum-can-i-do-something-about is a related post.