运行时:
$ make html
我明白了:
...
/home/app_dir/app1/forms.py:docstring of app1.forms.SomeForm.some_method:3: ERROR: Unknown interpreted text role "method".
...
我的方法docstring是:
...
This method uses :method:`~app1.forms.other_method` to do other thing.
...
如何交叉引用此other_method
?
答案 0 :(得分:1)
根据Sphinx Domains,应使用:py:meth:
正确的文档字符串是:
...
This method uses :meth:`~app1.forms.other_method` to do other thing.
...
注意:Python域是默认值,因此:py:meth:
与:meth: