msg233573 - (view) |
Author: Al Sweigart (Al.Sweigart) * |
Date: 2015-01-07 10:26 |
The IDLE code base has several unused imports and local variables. The testcode.py file seems to have been accidentally checked in. These changes were found through a lint program, not by hand. All idle unit tests pass after these changes. |
|
|
msg233606 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2015-01-07 22:03 |
I am aware of some of these from running PyChecker over idlelib, but had not gotten around to an global patch yet. The unit test coverage is still woefully incomplete, so I will want to check each deletion. I have been meaning to delete testcode.py, but in a separate commit. |
|
|
msg233623 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2015-01-08 04:49 |
New changeset 1c3f8d044589 by Terry Jan Reedy in branch '2.7': Issue #23184: delete unused idlelib file. https://hg.python.org/cpython/rev/1c3f8d044589 New changeset 364e44a49a31 by Terry Jan Reedy in branch '3.4': Issue #23184: delete unused idlelib file. https://hg.python.org/cpython/rev/364e44a49a31 |
|
|
msg233624 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2015-01-08 06:14 |
There were errors in the patch. FileList.py: EditorWindow is used later. RemoteDebugger.py: frame is used twice, as visible in the diff. My copy of hg is not working right at the moment, or I would have applied the rest. |
|
|
msg233716 - (view) |
Author: Al Sweigart (Al.Sweigart) * |
Date: 2015-01-09 05:45 |
I've updated the patch. I've removed the EditorWindow deletion. Importing that and using it as a class variable instead of using an assignment statement wasn't picked up. (Is there a more opaque way to do this import?) I've left the RemoteDebugger.py change in. The frame variable name is (confusingly) reused: frame = frametable[fid] # ...cut for brevity... stack, i = self.idb.get_stack(frame, tb) stack = [(wrap_frame(frame), k) for frame, k in stack] Changed to: # ...cut for brevity... stack, i = self.idb.get_stack(frametable[fid], tb) stack = [(wrap_frame(frame), k) for frame, k in stack] The first use of frame is eliminated by simply using frametable[fid] instead. The second use is as the temporary variable inside the list comprehension, which means the "frame" name is reused. With this change, the only time the frame local variable is used is in the list comprehension. This gets rid of the name reuse and makes it a bit simpler. |
|
|
msg233717 - (view) |
Author: Al Sweigart (Al.Sweigart) * |
Date: 2015-01-09 05:46 |
*more transparent, that is. Not opaque. |
|
|
msg243230 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2015-05-14 23:13 |
I got hg working and pushed the patch I had in January as a980da5f79f9, 5386aedf3ac9, 15701e89d710, and 3fa58e779308. Having forgotten that this issue was on the tracker (rather than just idle-sig post), I omitted the issue number and acknowledgement for the initial patch. I will add both when I add a new entry. I am working on another patch to include maxOsSupport and other changes found by pyflakes. I will add in the 'frame' change, the double use *is* confusing. pyflakes identifies files with * imports with a note that this prevents checks. I try to removed them when adding tests. I might do more just to make files checkable. |
|
|
msg243231 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2015-05-14 23:14 |
News entry, not new entry (Cannot edit commit messages) |
|
|
msg243239 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2015-05-15 02:13 |
More idlelib fixes. Will push after reviewing. pyflakes shows extraneous items in idle_test also. |
|
|
msg243293 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2015-05-16 03:04 |
New changeset d50d661a08f5 by Terry Jan Reedy in branch '2.7': Issue #23184: idlelib, remove more unused names and imports. https://hg.python.org/cpython/rev/d50d661a08f5 New changeset 777569dd4bca by Terry Jan Reedy in branch '3.4': Issue #23184: idlelib, remove more unused names and imports. https://hg.python.org/cpython/rev/777569dd4bca New changeset 6c424b06320b by Terry Jan Reedy in branch 'default': Merge with 3.4 Issue #23184: idlelib, remove more unused names and imports. https://hg.python.org/cpython/rev/6c424b06320b |
|
|
msg243294 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2015-05-16 03:56 |
New changeset 8875d7c6a99d by Terry Jan Reedy in branch '2.7': Issue #23184: idle tests, remove unused names and imports. https://hg.python.org/cpython/rev/8875d7c6a99d New changeset 526ce81f700d by Terry Jan Reedy in branch '3.4': Issue #23184: idle tests, remove unused names and imports. https://hg.python.org/cpython/rev/526ce81f700d New changeset 2a56eb5c08cc by Terry Jan Reedy in branch 'default': Merge 3.4 #23184: idle tests, remove unused names and imports. https://hg.python.org/cpython/rev/2a56eb5c08cc |
|
|