[issue33628] IDLE: Code cleanup on codecontext

2018-05-23 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33628] IDLE: Code cleanup on codecontext

2018-05-23 Thread miss-islington

miss-islington  added the comment:


New changeset b2ab5dc72b36d074a86f2b1d91ae804e5a7210f8 by Miss Islington (bot) 
in branch '3.7':
bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests  (GH-7085)
https://github.com/python/cpython/commit/b2ab5dc72b36d074a86f2b1d91ae804e5a7210f8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33628] IDLE: Code cleanup on codecontext

2018-05-23 Thread miss-islington

miss-islington  added the comment:


New changeset 935c81bbbca28ca23862d7ee1f79cd502e447edd by Miss Islington (bot) 
in branch '3.6':
bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests  (GH-7085)
https://github.com/python/cpython/commit/935c81bbbca28ca23862d7ee1f79cd502e447edd


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33628] IDLE: Code cleanup on codecontext

2018-05-23 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6728

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33628] IDLE: Code cleanup on codecontext

2018-05-23 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6727

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33628] IDLE: Code cleanup on codecontext

2018-05-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 8506016f904ba6bc27bf5261f27a0bdd5945cd26 by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
 bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests  (GH-7085)
https://github.com/python/cpython/commit/8506016f904ba6bc27bf5261f27a0bdd5945cd26


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33628] IDLE: Code cleanup on codecontext

2018-05-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Super list.  It made the diff really easy to parse into related changes.  I 
printed it, reviewed code for items one by one, made a few changes, and checked 
them off when satisfied.

IDLE *does* (sort of) allow tabs.  One can read a file with tabs or Format => 
Tabify.  Config-main.def still has 'use-spaces= 1' and I believe it is still 
read and acted on, at least in some places. (This is, of course, untested.) The 
option to turn it off on the dialog has been removed, but I believe it still 
could be turned off by hand-editing .idlerc/config-main.cfg.  Of course, since 
3.x rejects mixtures, beginners should expand tabs before editing existing 
files.

I have thought about possibly reviewing the tab situation, but in the absence 
of people having problems with the status quo, it is very low priority.  Maybe 
after 3.8 and the end of 2.x support.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33628] IDLE: Code cleanup on codecontext

2018-05-23 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
keywords: +patch
pull_requests: +6718
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33628] IDLE: Code cleanup on codecontext

2018-05-23 Thread Cheryl Sabella

New submission from Cheryl Sabella :

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com