Python IDE-具有PyCharm和vs代码的文档字符串

问题描述

我最近切换为使用PyCharm作为我的主要python IDE。我在生成文档字符串时遇到问题。我通常遵循Google标准,PyCharm本身支持该标准,并且在vscode(https://github.com/NilsJPWerner/autoDocstring)上有扩展名。

在vscode中,我获得了很好的自动完成功能,尤其是对于默认和可选参数。但是,在PyCharm中,我只能为类型信息添加一个占位符。下面是两个示例:

生成篡改的代码:

def fun(first,second = 1,third = ''):
    raise NotImplementedError

带有autoDocstring的vscode:

"""[summary]

Args:
    first ([type]): [description]
    second (int,optional): [description]. Defaults to 1.
    third (str,optional): [description]. Defaults to ''.

Raises:
    NotImplementedError: [description]
"""

PyCharm:

"""

Args:
    first (): 
    second (): 
    third (): 

Returns:

"""

是否有一种方法可以改善PyCharm可以生成的内容并使它更接近于vscode和autoDocstring的组合?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)