未验证 提交 0f623ad7 编写于 作者: Z zhangchunle 提交者: GitHub

fix apispec bug;test=document_fix (#25699)

上级 f82baed8
......@@ -107,6 +107,8 @@ def visit_member(parent_name, member):
visit_member(cur_name, value)
elif inspect.ismethoddescriptor(member):
return
elif inspect.isbuiltin(member):
return
elif callable(member):
queue_dict(member, cur_name)
elif inspect.isgetsetdescriptor(member):
......
......@@ -470,7 +470,7 @@ def get_filenames():
except AttributeError:
whl_error.append(api)
continue
if len(module.split('.')) > 2:
if len(module.split('.')) > 1:
filename = '../python/'
module_py = '%s.py' % module.split('.')[-1]
for i in range(0, len(module.split('.')) - 1):
......@@ -482,7 +482,9 @@ def get_filenames():
print("\n" + api + ' module is ' + module + "\n")
if filename != '':
# rm contrib file
if filename.startswith('../python/paddle/fluid/contrib'):
if filename.startswith(
'../python/paddle/fluid/contrib'
) or filename == '../python/paddle/verison.py':
pass
elif filename not in filenames:
filenames.append(filename)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册