summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorWeipeng Hong <hongweichen8888@sina.com>2022-01-21 21:24:33 (GMT)
committerGitHub <noreply@github.com>2022-01-21 21:24:33 (GMT)
commit881a763cfe07ef4a5806ec78f13a9bc99e8909dc (patch)
tree691ee16f62705ba8254854695e9a9ad4a36860dc /Lib/inspect.py
parent00b2b578bd9e516d601063a086b03177f546bcdd (diff)
downloadcpython-881a763cfe07ef4a5806ec78f13a9bc99e8909dc.zip
cpython-881a763cfe07ef4a5806ec78f13a9bc99e8909dc.tar.gz
cpython-881a763cfe07ef4a5806ec78f13a9bc99e8909dc.tar.bz2
bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285)
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 7a8f5d3..879a577 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -2511,9 +2511,9 @@ def _signature_from_callable(obj, *,
pass
else:
if text_sig:
- # If 'obj' class has a __text_signature__ attribute:
+ # If 'base' class has a __text_signature__ attribute:
# return a signature based on it
- return _signature_fromstr(sigcls, obj, text_sig)
+ return _signature_fromstr(sigcls, base, text_sig)
# No '__text_signature__' was found for the 'obj' class.
# Last option is to check if its '__init__' is