From 881a763cfe07ef4a5806ec78f13a9bc99e8909dc Mon Sep 17 00:00:00 2001 From: Weipeng Hong Date: Sat, 22 Jan 2022 05:24:33 +0800 Subject: bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285) --- Lib/inspect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/inspect.py') diff --git a/Lib/inspect.py b/Lib/inspect.py index 7a8f5d34643..879a577d43f 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 -- cgit v1.2.3