最近从 M1 迁移到 M2 mac。之前成功调用 pdoc 是在 M1 上使用 Ventura 13.6(相同的 python 版本)。我是否缺少先决条件,或者可能需要降级依赖项,或者这是由于模块中其他位置的文档字符串中存在未报告的错误?
示例源代码:
"""
Args:
script_path (str, optional): the full s3 or github uri, or local path to the script you want the service to execute. Defaults to "./script.py".
"""
正确渲染了 Args 部分,来自之前的调用,例如,
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>script_path</code></strong> : <code>str</code>, optional</dt>
<dd>the full s3 or github uri, or local path to the script you want the service to execute. Defaults to "./script.py".</dd>
</dl>
当前环境中的 Args 部分渲染不正确:
<p>Args:<br>
script_path (str, optional): the full s3 or github uri, or local path
to the script you want the service to execute. Defaults to "./script.py".
</p>
0.10.0
3.9.16
(pyenv)13.6.2
问题是由
Args:
之后的尾随空格引起的
失败了:
Args:
这样就成功了:Args:
我可能在某个时刻进行了查找/替换,这弄乱了一切。