def get_func_doc(name, func):
doc_source = ''
if name in SKIP:
return ''
# if name[0] == '_':
# return ''
if func in classes_and_functions:
return ''
classes_and_functions.add(func)
header = name + inspect.formatargspec(*inspect.getargspec(func))
path = get_src_path(func)
# FUNC_TEMP = "[{header}]({path})"
# header = FUNC_TEMP.format(header=header, path=path)
# print(header)
docstring = format_func_doc(inspect.getdoc(func), module_name + '.' +
header, path)
print(docstring)
if docstring != '':
doc_source += docstring
doc_source += '\n\n ---------- \n\n'
return doc_source
评论列表
文章目录