从文件中获取Python docstrings
docstring-extractor的Python项目详细描述
docstring提取器
从文件或Python源代码获取Python docstrings。在
用法示例:
>>>fromdocstring_extractorimportget_docstrings>>>>>>withopen("example.py")asfile:...get_docstrings(file)...{'module':'example','content':[{'type':'Function','name':'my_fuction','line':4,'docstring':'Long description spanning multiple lines\n- First line\n- Second line\n- Third line\n\n:param name: description 1\n:param int priority: description 2\n:param str sender: description 3\n:raises ValueError: if name is invalid'}]}
贡献
此项目使用Black。在
- 项目
标签: