]> 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:37 +0000 (18:52 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Tue, 1 Jul 2014 22:52:37 +0000 (18:52 -0400)
Lib/idlelib/CallTipWindow.py
Lib/idlelib/ClassBrowser.py
Lib/idlelib/Debugger.py
Lib/idlelib/configDialog.py
Lib/idlelib/configHandler.py

index aacfa00851b3c17f016d5c82a6f814ac326d11b6..84d22fd6671489e22966aaeff4c1cd9f8844bf10 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 ee1a70f9dc5d7f1e87703952953f26b7899a729b..a0e782e0f8555621bc1303f1d01fe641272edf99 100644 (file)
@@ -101,7 +101,7 @@ class ModuleBrowserTreeItem(TreeItem):
             return []
         try:
             dict = pyclbr.readmodule_ex(name, [dir] + sys.path)
-        except ImportError as msg:
+        except ImportError:
             return []
         items = []
         self.classes = {}
index ca98b107c48eb8482b6b81b390bfb001afe3c3a2..6875197874eb7ff0fe023fcf3706572e869cfa87 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 30238af768b3f2b31c87d4898cb39f033ddb847a..72dd6b9de531e2995adf0cd71d1991513442ccd0 100644 (file)
@@ -13,7 +13,6 @@ from tkinter import *
 import tkinter.messagebox as tkMessageBox
 import tkinter.colorchooser as tkColorChooser
 import tkinter.font as tkFont
-import copy
 
 from idlelib.configHandler import idleConf
 from idlelib.dynOptionMenuWidget import DynOptionMenu
@@ -679,7 +678,7 @@ class ConfigDialog(Toplevel):
         if self.listBindings.curselection():
             reselect=1
             listIndex=self.listBindings.index(ANCHOR)
-        keySet=idleConf.GetKeySet(keySetName)
+        # keySet=idleConf.GetKeySet(keySetName) # unused, delete?
         bindNames = list(keySet.keys())
         bindNames.sort()
         self.listBindings.delete(0,END)
index 8608f7c869378494429793fe5a5f8903d4c3831d..745d5500ce45be77efea28e4d80fbf24d5c624f8 100644 (file)
@@ -20,7 +20,7 @@ configuration problem notification and resolution.
 import os
 import sys
 
-from configparser import ConfigParser, NoOptionError, NoSectionError
+from configparser import ConfigParser
 
 class InvalidConfigType(Exception): pass
 class InvalidConfigSet(Exception): pass