[New-bugs-announce] [issue33628] IDLE: Code cleanup on codecontext

Cheryl Sabella report at bugs.python.org
Wed May 23 19:48:33 EDT 2018


New submission from Cheryl Sabella <cheryl.sabella at gmail.com>:

Based on the github comments on PR5638, some code cleanup issues identified for codecontext.

codecontext
* getspacesfirstword - function and param1 name
* get_line_info - make into helper function and change parm
* get_context - call to get_line_info sends text instead of line number
* toggle_code_context_event - move border calc to same loop at padx
* cleanup some comments

test_codecontext
* test_get_line_info - move test to helper test class and change parm from line number to line
* test_get_line_info - add test for tab (I noticed 'indent' is 1 when the regex matches to a tab.  Even though IDLE doesn't allow tabs in the editor, I didn't want to lose track of this).
* test_getspacesfirstword - function name
* test_del - remove call to after info

----------
assignee: terry.reedy
components: IDLE
messages: 317479
nosy: cheryl.sabella, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Code cleanup on codecontext
type: enhancement
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33628>
_______________________________________


More information about the New-bugs-announce mailing list