Update Lib/idlelib/calltip.py

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
Shixian Li 2025-12-27 20:41:57 +08:00 committed by GitHub
parent 3eb20acc79
commit 77c87cabe8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -187,8 +187,7 @@ def get_argspec(ob):
# Augment lines from docstring, if any, and join to get argspec.
doc = inspect.getdoc(ob)
if doc:
for line in doc.split('\n'):
lines.append(line.strip())
lines.extend(map(str.strip, doc.split('\n')))
argspec = '\n'.join(lines)
return argspec or _default_callable_argspec