summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 6e74471..cbc0632 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -395,7 +395,7 @@ def _has_code_flag(f, flag):
while ismethod(f):
f = f.__func__
f = functools._unwrap_partial(f)
- if not isfunction(f):
+ if not (isfunction(f) or _signature_is_functionlike(f)):
return False
return bool(f.__code__.co_flags & flag)