We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a15872 commit 252fc89Copy full SHA for 252fc89
doc/tools/apigen.py
@@ -22,7 +22,7 @@
22
import re
23
from inspect import getmodule
24
25
-from types import BuiltinFunctionType
+from types import BuiltinFunctionType, FunctionType
26
27
# suppress print statements (warnings for empty files)
28
DEBUG = True
@@ -221,8 +221,7 @@ def _parse_module_with_import(self, uri):
221
if not self.other_defines and not getmodule(obj) == mod:
222
continue
223
# figure out if obj is a function or class
224
- if hasattr(obj, 'func_name') or \
225
- isinstance(obj, BuiltinFunctionType):
+ if isinstance(obj, (FunctionType, BuiltinFunctionType)):
226
functions.append(obj_str)
227
else:
228
try:
0 commit comments