Terry J. Reedy <tjre...@udel.edu> added the comment:

I believe I meant the opposite of what I said, which fortunately is what Tal 
did.  PR 14500 is the one I looked at and commented on and the name change in 
PR 14500 is what needed to be included in PR 12481 (done).

I would like to retitle this issue 'IDLE: Move format functions into 1 file:. 
and put all the functions for the Format submenu in one file, format.py, with 
test_format.py.  The result will be near 400 lines.  Rename paragraph.py and 
test_paragraph.py and put contents of proposed new files in those instead.  Add 
another class, FormatFile for the 3 file reforming functions.

If you want, I would not mind merging the PR as is, but with 'region' removed 
from the names, and adding in FormatParagraph and a new FormatFile in a 
separate PR.  But I don't know the consequence for the file history and git 
blame.  I would prefer that format.py be seen as the successor of paragraph.py 
if that would enable blame to trace back through the rename.

paragraph already has some utility functions, including get_indent, which is 
similar to get_line_indent.  We might combine them in the follow-up 
refactoring.  There is at least one bug, mentioned in file, to fix.

Followup refactoring should include examination of docstrings and IDLE doc.  
The doc should briefly define 'region'.

SimpleDialog.AskInteger should be replaced by a Query subclass both here and in 
EditorWindow.goto_line_event (another issue and PR).

Menu adjustments: Move Format Paragraph to top, leaving the 3 file operations 
together at the bottom.  ^[ also indents.  (Tab indents if more than one line 
is selected.)  Strip trailing whitespace should string trailing blank lines.

----------

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

Reply via email to