pdoc3 错误地渲染了 Args 部分

问题描述 投票:0回答:1

最近从 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> :&ensp;<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>
  • pdoc版本:pdoc
    0.10.0
  • python版本:
    3.9.16
    (pyenv)
  • M2 mac,带 os x Ventura
    13.6.2
python docstring pdoc
1个回答
0
投票

问题是由

Args:

之后的尾随空格引起的

失败了:

Args:  
这样就成功了:
Args:

我可能在某个时刻进行了查找/替换,这弄乱了一切。

© www.soinside.com 2019 - 2024. All rights reserved.