[Python-checkins] cpython (3.4): idlelib: remove unused names and imports (one is a duplicate import).
terry.reedy
python-checkins at python.org
Fri May 15 00:12:21 CEST 2015
https://hg.python.org/cpython/rev/5386aedf3ac9
changeset: 96053:5386aedf3ac9
branch: 3.4
parent: 96050:1012a8138fcb
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Thu May 14 18:10:50 2015 -0400
summary:
idlelib: remove unused names and imports (one is a duplicate import).
files:
Lib/idlelib/GrepDialog.py | 1 -
Lib/idlelib/IOBinding.py | 5 ++---
Lib/idlelib/PyParse.py | 1 -
Lib/idlelib/RemoteDebugger.py | 1 -
Lib/idlelib/ScriptBinding.py | 4 +---
Lib/idlelib/SearchDialog.py | 2 +-
Lib/idlelib/TreeWidget.py | 2 +-
Lib/idlelib/configDialog.py | 1 -
8 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/Lib/idlelib/GrepDialog.py b/Lib/idlelib/GrepDialog.py
--- a/Lib/idlelib/GrepDialog.py
+++ b/Lib/idlelib/GrepDialog.py
@@ -5,7 +5,6 @@
from tkinter import StringVar, BooleanVar, Checkbutton # for GrepDialog
from tkinter import Tk, Text, Button, SEL, END # for htest
from idlelib import SearchEngine
-import itertools
from idlelib.SearchDialogBase import SearchDialogBase
# Importing OutputWindow fails due to import loop
# EditorWindow -> GrepDialop -> OutputWindow -> EditorWindow
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -1,5 +1,4 @@
import os
-import types
import shlex
import sys
import codecs
@@ -525,7 +524,7 @@
if self.editwin.flist:
self.editwin.update_recent_files_list(filename)
-def _io_binding(parent):
+def _io_binding(parent): # htest #
root = Tk()
root.title("Test IOBinding")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
@@ -548,7 +547,7 @@
text.pack()
text.focus_set()
editwin = MyEditWin(text)
- io = IOBinding(editwin)
+ IOBinding(editwin)
if __name__ == "__main__":
from idlelib.idle_test.htest import run
diff --git a/Lib/idlelib/PyParse.py b/Lib/idlelib/PyParse.py
--- a/Lib/idlelib/PyParse.py
+++ b/Lib/idlelib/PyParse.py
@@ -1,7 +1,6 @@
import re
import sys
from collections import Mapping
-from functools import partial
# Reason last stmt is continued (or C_NONE if it's not).
(C_NONE, C_BACKSLASH, C_STRING_FIRST_LINE,
diff --git a/Lib/idlelib/RemoteDebugger.py b/Lib/idlelib/RemoteDebugger.py
--- a/Lib/idlelib/RemoteDebugger.py
+++ b/Lib/idlelib/RemoteDebugger.py
@@ -21,7 +21,6 @@
"""
import types
-from idlelib import rpc
from idlelib import Debugger
debugging = 0
diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py
--- a/Lib/idlelib/ScriptBinding.py
+++ b/Lib/idlelib/ScriptBinding.py
@@ -18,13 +18,11 @@
"""
import os
-import re
import string
import tabnanny
import tokenize
import tkinter.messagebox as tkMessageBox
-from idlelib.EditorWindow import EditorWindow
-from idlelib import PyShell, IOBinding
+from idlelib import PyShell
from idlelib.configHandler import idleConf
from idlelib import macosxSupport
diff --git a/Lib/idlelib/SearchDialog.py b/Lib/idlelib/SearchDialog.py
--- a/Lib/idlelib/SearchDialog.py
+++ b/Lib/idlelib/SearchDialog.py
@@ -23,7 +23,7 @@
class SearchDialog(SearchDialogBase):
def create_widgets(self):
- f = SearchDialogBase.create_widgets(self)
+ SearchDialogBase.create_widgets(self)
self.make_button("Find Next", self.default_command, 1)
def default_command(self, event=None):
diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py
--- a/Lib/idlelib/TreeWidget.py
+++ b/Lib/idlelib/TreeWidget.py
@@ -245,7 +245,7 @@
else:
self.edit_finish()
try:
- label = self.label
+ self.label
except AttributeError:
# padding carefully selected (on Windows) to match Entry widget:
self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2)
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py
--- a/Lib/idlelib/configDialog.py
+++ b/Lib/idlelib/configDialog.py
@@ -16,7 +16,6 @@
from idlelib.configHandler import idleConf
from idlelib.dynOptionMenuWidget import DynOptionMenu
-from idlelib.tabbedpages import TabbedPageSet
from idlelib.keybindingDialog import GetKeysDialog
from idlelib.configSectionNameDialog import GetCfgSectionNameDialog
from idlelib.configHelpSourceEdit import GetHelpSourceDialog
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list