-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDLE: calltips not properly formatted for functions without doc-strings #79822
Comments
IDLE usually wraps call-tips to 85 characters. However, for functions without a doc-string, this formatting is skipped. This is an issue for functions with long signatures, e.g. due to having many arguments or due to having default values with long repr-s. This appears to be caused by line 170 in Lib/idlelib/calltip.py being indented once too much. (see: https://github.com/python/cpython/blob/87e59ac11ee074b0dc1bc864c74fac0660b27f6e/Lib/idlelib/calltip.py) Thanks to Dan Snider for the original report in msg332881 on issue bpo-35196. Example: >>> def foo(s='a'*100):
pass
>>> print(get_argspec(foo))
(s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
>>> def bar(s='a'*100):
"""doc-string"""
pass
>>> print(get_argspec(bar))
(s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaa')
doc-string |
I'm marking this as easy. Whoever works on this should make sure to add a new test case for this bug. |
Hi Tal Einat! I would like to take this issue to be my first contribution :-) Thanks! |
Thanks for the report, Dan! Thanks for the fix, Emmanuel! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: