summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-01-22 17:28:48 (GMT)
committerGitHub <noreply@github.com>2022-01-22 17:28:48 (GMT)
commit83aef4d34022f293336f606dba8598cc7ac8f9f2 (patch)
tree73a1d5f670c3e55d4900dd673b35d4cf236dbe15 /Lib/inspect.py
parent923c994400b3f1c67f95d25c703e131890a16912 (diff)
downloadcpython-83aef4d34022f293336f606dba8598cc7ac8f9f2.zip
cpython-83aef4d34022f293336f606dba8598cc7ac8f9f2.tar.gz
cpython-83aef4d34022f293336f606dba8598cc7ac8f9f2.tar.bz2
bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285) (#30765)
(cherry picked from commit 881a763cfe07ef4a5806ec78f13a9bc99e8909dc) Co-authored-by: Weipeng Hong <hongweichen8888@sina.com> Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
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 6d43d8d..c5881cc 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