[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +14621 pull_request: https://github.com/python/cpython/pull/14827 ___ Python tracker ___ __

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 093e9b1268f21624a09777818903f1088c674689 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14812) https://github.com/python/cpython/commit/093e9b1268f21624a09777818903f1

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 1fc43a3fafd22eb20832459654fd125f12aa3738 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14811) https://github.com/python/cpython/commit/1fc43a3fafd22eb20832459654fd12

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14606 pull_request: https://github.com/python/cpython/pull/14812 ___ Python tracker ___ __

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14605 pull_request: https://github.com/python/cpython/pull/14811 ___ Python tracker ___ __

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 82494aa6d947c4a320c09c58fe0f100cdcf7af0b by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-36390: IDLE: Combine region formatting methods. (GH-12481) https://github.com/python/cpython/commit/82494aa6d947c4a320c09c58fe0f100cdcf7af0b -

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: When this is merged, I will open a format menu master issue listing todos. Dependencies will include 4 issues, #24817, #5150 (two items), #18583 (with patch), and #23367 (with patch), other than #36219, follow-up code revisions, and revising README.txt. ---

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-11 Thread Terry J. Reedy
Terry J. Reedy 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: Mo

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-11 Thread Tal Einat
Tal Einat added the comment: New changeset a2cf88efc417f1991720856f6913d16660e48941 by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500) https://github.com/python/cpython/commit/a2cf88efc417f1991720856f6913d16660e48941

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-11 Thread Tal Einat
Tal Einat added the comment: New changeset 242ad1f375bf564c35cf99cd754b2c5819c4d056 by Tal Einat (Miss Islington (bot)) in branch '3.8': bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500) https://github.com/python/cpython/commit/242ad1f375bf564c35cf99cd754b2c5819c4d056

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-11 Thread Tal Einat
Change by Tal Einat : -- versions: +Python 3.7, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-11 Thread Tal Einat
Tal Einat added the comment: > I propose to merge PR 12481 first, after review, with tests, and then include > name change with rewrite in PR 14500. I've gone ahead and merged PR GH-14500 into master, since it was ready to get and a clear improvement. I've already merged this into PR GH-124

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +14507 pull_request: https://github.com/python/cpython/pull/14707 ___ Python tracker ___ __

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +14508 pull_request: https://github.com/python/cpython/pull/14708 ___ Python tracker ___ __

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-11 Thread Tal Einat
Tal Einat added the comment: New changeset 9b5ce62cac27fec9dea473865d79c2c654312957 by Tal Einat in branch 'master': bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500) https://github.com/python/cpython/commit/9b5ce62cac27fec9dea473865d79c2c654312957 -- __

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-03 Thread Tal Einat
Tal Einat added the comment: > I propose to merge PR 12481 first, after review, with tests, and then include > name change with rewrite in PR 14500. I think GH-14500 is in good shape now. I'd be happy to merge either PR with master after the other PR is merged, so please don't worry about th

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Tabwidth for the Text widget is currently fixed at 8 based on claim in editor.py that nothing else works correctly. It would be nice to verify if this is still correct. If it is, then there would seem to be no need to pass it around. -- _

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think get_indent(line) is much clearer than classifyws(s)???. I propose to merge PR 12481 first, after review, with tests, and then include name change with rewrite in PR 14500. Proposed docstring: "Return line indent as # chars and effective # of spaces.

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-01 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +14317 pull_request: https://github.com/python/cpython/pull/14500 ___ Python tracker ___ ___

[issue36390] IDLE: Refactor formatting methods from editor

2019-07-01 Thread Tal Einat
Tal Einat added the comment: Looking at the code yet again, there are several places where replacing classifyws() as I suggested would make it clunkier. So let's leave it there, at least in editor.py. Still, the classifyws() implementation can be greatly simplified. See PR GH-14500 (with te

[issue36390] IDLE: Refactor formatting methods from editor

2019-06-30 Thread Tal Einat
Tal Einat added the comment: > 1. The name `formatregion` could probably be improved. FormatRegion is good enough, and is consistent with FormatParagraph. > 2. The `classifyws` method is a module level method in editor. It's needed > in `formatregion` also, so I made a copy (bad!). I wou

[issue36390] IDLE: Refactor formatting methods from editor

2019-03-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: Refactoring the methods was relatively straight forward, but I did have some questions: 1. The name `formatregion` could probably be improved. 2. The `classifyws` method is a module level method in editor. It's needed in `formatregion` also, so I made a c

[issue36390] IDLE: Refactor formatting methods from editor

2019-03-21 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +12433 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue36390] IDLE: Refactor formatting methods from editor

2019-03-21 Thread Cheryl Sabella
New submission from Cheryl Sabella : In editor.py, there are several methods (indent, dedent, comment, uncomment, tabify, untabify) that are event handlers for formatting text. To simplify testing and to simplify the EditorWindow class, refactor these methods into their own method. This was