idlelib: remove unused names and imports (one is a duplicate import).
authorTerry Jan Reedy <tjreedy@udel.edu>
Thu, 14 May 2015 22:10:50 +0000 (18:10 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Thu, 14 May 2015 22:10:50 +0000 (18:10 -0400)
Lib/idlelib/GrepDialog.py
Lib/idlelib/IOBinding.py
Lib/idlelib/PyParse.py
Lib/idlelib/RemoteDebugger.py
Lib/idlelib/ScriptBinding.py
Lib/idlelib/SearchDialog.py
Lib/idlelib/TreeWidget.py
Lib/idlelib/configDialog.py

index aa866d0b7529b7c1b396b41efc2dc24491d3711e..721b231a9e86bc654e17da318fd7f239be2defba 100644 (file)
@@ -5,7 +5,6 @@ import sys
 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
index 841a30810aabf00e478be70f6e3724826d381123..505cc8b83e742418d3c328531f9ad3b0b387dd0b 100644 (file)
@@ -1,5 +1,4 @@
 import os
-import types
 import shlex
 import sys
 import codecs
@@ -525,7 +524,7 @@ class IOBinding:
         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 @@ def _io_binding(parent):
     text.pack()
     text.focus_set()
     editwin = MyEditWin(text)
-    io = IOBinding(editwin)
+    IOBinding(editwin)
 
 if __name__ == "__main__":
     from idlelib.idle_test.htest import run
index 3e501ca1a191af4566e33fa119c998d23925dee9..9ccbb250761e362e038f30a2a1f15e40d1cd3d1b 100644 (file)
@@ -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,
index d8662bbd96ebb3a6f926a6725315c6261f42ed7d..6672ba6535afd55aea361ad2ce04dccf221f3281 100644 (file)
@@ -21,7 +21,6 @@ barrier, in particular frame and traceback objects.
 """
 
 import types
-from idlelib import rpc
 from idlelib import Debugger
 
 debugging = 0
index b78363708f8babec4269145f1cff0dfdb3f39179..3d11e975554e94c9b3b0d1757a8314102d5e090b 100644 (file)
@@ -18,13 +18,11 @@ XXX GvR Redesign this interface (yet again) as follows:
 """
 
 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
index 38408b8dea284cf851fe0a03688cbeede5fac72b..77ef7b9a82c382f4c772f1e95162f1f60c2d2144 100644 (file)
@@ -23,7 +23,7 @@ def find_selection(text):
 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):
index 860f60c12169f9b51e1c7c588171bda9fb05ab2c..4844a695ad236db365ade6f2b4719294e2118c70 100644 (file)
@@ -245,7 +245,7 @@ class TreeNode:
         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)
index ec1de6cc05f93cad7b4f7630bca4e158272d0203..b0247f01dc275d798c1244bcdf4a0019d178a6c2 100644 (file)
@@ -16,7 +16,6 @@ import tkinter.font as tkFont
 
 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