]> granicus.if.org Git - python/commitdiff
Delete a few unused names suggested by pyflakes.
authorTerry Jan Reedy <tjreedy@udel.edu>
Tue, 1 Jul 2014 22:52:31 +0000 (18:52 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Tue, 1 Jul 2014 22:52:31 +0000 (18:52 -0400)
Lib/idlelib/CallTipWindow.py
Lib/idlelib/ClassBrowser.py
Lib/idlelib/Debugger.py
Lib/idlelib/configHandler.py

index 265b2facc2dfccd555480c82b919c2da592d1c1d..2077407483bed91b4717cccc2e23b0a38e80df26 100644 (file)
@@ -2,9 +2,8 @@
 
 After ToolTip.py, which uses ideas gleaned from PySol
 Used by the CallTips IDLE extension.
-
 """
-from Tkinter import *
+from Tkinter import Toplevel, Label, LEFT, SOLID, TclError
 
 HIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-hide>>"
 HIDE_SEQUENCES = ("<Key-Escape>", "<FocusOut>")
@@ -133,13 +132,16 @@ class CallTip:
         return bool(self.tipwindow)
 
 
-def _calltip_window(parent):
+def _calltip_window(parent):  # htest #
+    import re
+    from Tkinter import Tk, Text, LEFT, BOTH
+
     root = Tk()
     root.title("Test calltips")
     width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
     root.geometry("+%d+%d"%(x, y + 150))
 
-    class MyEditWin: # comparenceptually an editor_window
+    class MyEditWin: # conceptually an editor_window
         def __init__(self):
             text = self.text = Text(root)
             text.pack(side=LEFT, fill=BOTH, expand=1)
@@ -161,7 +163,7 @@ def _calltip_window(parent):
         def calltip_hide(self, event):
             self.calltip.hidetip()
 
-    editwin = MyEditWin()
+    MyEditWin()
 
 if __name__=='__main__':
     from idlelib.idle_test.htest import run
index 6183be92ae9529c7f363b9b8d7b6add1be574dd4..a0e782e0f8555621bc1303f1d01fe641272edf99 100644 (file)
@@ -101,7 +101,7 @@ class ModuleBrowserTreeItem(TreeItem):
             return []
         try:
             dict = pyclbr.readmodule_ex(name, [dir] + sys.path)
-        except ImportError, msg:
+        except ImportError:
             return []
         items = []
         self.classes = {}
index 94a8cb251405afe4307d766e031b7c71fd8b7fb6..71045dde55089049a4b3bf7e926b9a9f171f22a7 100644 (file)
@@ -1,6 +1,5 @@
 import os
 import bdb
-import types
 from Tkinter import *
 from idlelib.WindowList import ListedToplevel
 from idlelib.ScrolledList import ScrolledList
index 67ab1f653d82c814e17f1c1cb38176671d9178d1..173751e5c4375102c55a327519b60cc74625afe5 100644 (file)
@@ -20,7 +20,7 @@ configuration problem notification and resolution.
 import os
 import sys
 import string
-from ConfigParser import ConfigParser, NoOptionError, NoSectionError
+from ConfigParser import ConfigParser
 
 class InvalidConfigType(Exception): pass
 class InvalidConfigSet(Exception): pass