我使用的是狮身人面像的todo扩展,但是下面代码中显示的todo被忽略了--知道为什么吗?它可以“查看”放置在index.rst文件中的index.rst,以便启用todo处理。谢谢你的建议,因为我没有主意了!
"""This is a test class definition."""
from typing import TypeVar
TypeTestMe = TypeVar("TypeTestMe", bound="TestMe")
class TestMe(object):
"""Simple object to test sphinx"""
def __init__(self: TypeTestMe, name: str) -> None:
"""
Constructor for the object.
The first line is brief explanation, which may be completed with
a longer one. For instance to discuss about its methods. The only
method here is :func:`function1`'s. The main idea is to document
the class and methods's arguments with
- **parameters**, **types**, **return** and **return types**::
:param str: The name of the owner of this object
:type arg1: string
:return: None
.. todo::
Todo in source code.
"""发布于 2022-10-29 11:27:32
好的,一堆错误都证明了!
code
todo是在autodoc之上构建的,所以如果autodoc没有记录您的代码模块,也不会得到任何todo;如果这是错误
todo块的语法是缩进的,所以< code >h 212g 213.. todo:: This comment will appear
.. todo::
This comment is ignored because of bad indentation and you get a warning
.. todo::
This is the correct indentation and this todo will appear.todo配置是否正确。https://stackoverflow.com/questions/74244621
复制相似问题