This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE: calltips not properly formatted for functions without doc-strings
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: bup, eamanu, miss-islington, taleinat, terry.reedy
Priority: normal Keywords: easy, patch, patch, patch, patch

Created on 2019-01-02 16:43 by taleinat, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11415 merged eamanu, 2019-01-02 19:43
PR 11420 merged miss-islington, 2019-01-03 07:48
PR 11479 merged terry.reedy, 2019-01-09 15:36
PR 11480 merged miss-islington, 2019-01-09 15:44
Messages (8)
msg332882 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2019-01-02 16:43
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
msg332885 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2019-01-02 17:43
I'm marking this as easy.

Whoever works on this should make sure to add a new test case for this bug.
msg332886 - (view) Author: Emmanuel Arias (eamanu) * Date: 2019-01-02 18:03
Hi Tal Einat!

I would like to take this issue to be my first contribution :-)

Thanks!
msg332917 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-01-03 07:48
New changeset ab54b9a130c88f708077c2ef6c4963b632c132b3 by Terry Jan Reedy (Emmanuel Arias) in branch 'master':
bpo-35641: IDLE - format calltip properly when no docstring (GH-11415)
https://github.com/python/cpython/commit/ab54b9a130c88f708077c2ef6c4963b632c132b3
msg332925 - (view) Author: miss-islington (miss-islington) Date: 2019-01-03 09:44
New changeset 3c83cb7eed4f0e8b9f1cbf39263a2053a2483cb0 by Miss Islington (bot) in branch '3.7':
bpo-35641: IDLE - format calltip properly when no docstring (GH-11415)
https://github.com/python/cpython/commit/3c83cb7eed4f0e8b9f1cbf39263a2053a2483cb0
msg332926 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2019-01-03 09:52
Thanks for the report, Dan!

Thanks for the fix, Emmanuel!
msg333326 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-01-09 15:44
New changeset ee6559436797032b816dfb8c6376c9a451014962 by Terry Jan Reedy in branch 'master':
bpo-35641: Move IDLE blurb to IDLE directory (#11479)
https://github.com/python/cpython/commit/ee6559436797032b816dfb8c6376c9a451014962
msg333328 - (view) Author: miss-islington (miss-islington) Date: 2019-01-09 15:49
New changeset 6f76ef81596bbd885957b7fea3f40024ed9d6797 by Miss Islington (bot) in branch '3.7':
bpo-35641: Move IDLE blurb to IDLE directory (GH-11479)
https://github.com/python/cpython/commit/6f76ef81596bbd885957b7fea3f40024ed9d6797
History
Date User Action Args
2022-04-11 14:59:09adminsetgithub: 79822
2019-01-09 19:22:17terry.reedysetpull_requests: - pull_request10994
2019-01-09 19:21:55terry.reedysetpull_requests: - pull_request10995
2019-01-09 15:49:44miss-islingtonsetmessages: + msg333328
2019-01-09 15:44:51miss-islingtonsetpull_requests: + pull_request10995
2019-01-09 15:44:39miss-islingtonsetpull_requests: + pull_request10994
2019-01-09 15:44:27miss-islingtonsetpull_requests: + pull_request10993
2019-01-09 15:44:11terry.reedysetmessages: + msg333326
2019-01-09 15:40:21terry.reedysetpull_requests: - pull_request10991
2019-01-09 15:40:04terry.reedysetpull_requests: - pull_request10992
2019-01-09 15:36:32terry.reedysetpull_requests: + pull_request10992
2019-01-09 15:36:21terry.reedysetpull_requests: + pull_request10991
2019-01-09 15:36:11terry.reedysetpull_requests: + pull_request10990
2019-01-03 09:52:56taleinatsetstatus: open -> closed
messages: + msg332926

keywords: patch, patch, patch, patch, easy
resolution: fixed
stage: patch review -> resolved
2019-01-03 09:51:11taleinatsetpull_requests: - pull_request10830
2019-01-03 09:51:02taleinatsetpull_requests: - pull_request10831
2019-01-03 09:44:49miss-islingtonsetnosy: + miss-islington
messages: + msg332925
2019-01-03 07:48:37miss-islingtonsetpull_requests: + pull_request10831
2019-01-03 07:48:29miss-islingtonsetpull_requests: + pull_request10830
2019-01-03 07:48:22miss-islingtonsetpull_requests: + pull_request10829
2019-01-03 07:48:08terry.reedysetmessages: + msg332917
2019-01-02 19:47:11taleinatsetpull_requests: - pull_request10816
2019-01-02 19:47:01taleinatsetpull_requests: - pull_request10815
2019-01-02 19:46:51taleinatsetpull_requests: - pull_request10814
2019-01-02 19:43:33eamanusetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request10816
2019-01-02 19:43:25eamanusetkeywords: + patch
stage: needs patch -> needs patch
pull_requests: + pull_request10815
2019-01-02 19:43:18eamanusetkeywords: + patch
stage: needs patch -> needs patch
pull_requests: + pull_request10814
2019-01-02 19:43:12eamanusetkeywords: + patch
stage: needs patch -> needs patch
pull_requests: + pull_request10813
2019-01-02 18:03:19eamanusetnosy: + eamanu
messages: + msg332886
2019-01-02 17:43:28taleinatsetkeywords: + easy
assignee: taleinat ->
messages: + msg332885
2019-01-02 16:44:09taleinatsetnosy: + terry.reedy
versions: + Python 3.7, Python 3.8
assignee: taleinat
components: + IDLE
type: behavior
stage: needs patch
2019-01-02 16:43:39taleinatcreate