]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
idlelib: remove unused names and imports (one is a duplicate import).
authorTerry Jan Reedy <tjreedy@udel.edu>
Thu, 14 May 2015 22:10:30 +0000 (18:10 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Thu, 14 May 2015 22:10:30 +0000 (18:10 -0400)
Lib/idlelib/IOBinding.py
Lib/idlelib/RemoteDebugger.py
Lib/idlelib/SearchDialog.py
Lib/idlelib/TreeWidget.py
Lib/idlelib/configDialog.py

index e7d747c377b2c35cbd2c1bfbff446ed0a943c3c0..db6773f8a89dcfdd2f3312c5d29f403e1fe29316 100644 (file)
@@ -6,7 +6,6 @@
 #     which will only understand the local convention.
 
 import os
-import types
 import pipes
 import sys
 import codecs
@@ -391,7 +390,7 @@ class IOBinding:
             return False
 
     def encode(self, chars):
-        if isinstance(chars, types.StringType):
+        if isinstance(chars, str):
             # This is either plain ASCII, or Tk was returning mixed-encoding
             # text to us. Don't try to guess further.
             return chars
@@ -568,7 +567,7 @@ class IOBinding:
         "Update recent file list on all editor windows"
         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())))
@@ -591,7 +590,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 647285fe4e58cd458287cacb07a3a7cd9d061776..88efc7c3b36a0ea22aa18024b9bd2d3528f369e0 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 2aadb8431fd1f76fa7c656d98483be31d03c120d..043168af002bb51c7a39eecb11a1977c783a6e60 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 1e56e86b0cc878f97c13077ef7488e42887d7cd4..88083f0f29a364dfd60b3e1006d6a5ed719d2d86 100644 (file)
@@ -246,7 +246,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 c416151d9d5869f8886a00da66aa24a4fea71729..41b76e80c81bc4508c7fbf2f56d32a79bac63077 100644 (file)
@@ -14,7 +14,6 @@ import tkMessageBox, tkColorChooser, 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