New submission from Tal Einat <talei...@gmail.com>:

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 #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

----------
messages: 332882
nosy: bup, taleinat
priority: normal
severity: normal
status: open
title: IDLE: calltips not properly formatted for functions without doc-strings

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35641>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to