From: Terry Jan Reedy Date: Tue, 1 Jul 2014 22:52:31 +0000 (-0400) Subject: Delete a few unused names suggested by pyflakes. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9bc505616b4bc88b29993f351218c3083bd3f3e8;p=python Delete a few unused names suggested by pyflakes. --- diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py index 265b2facc2..2077407483 100644 --- a/Lib/idlelib/CallTipWindow.py +++ b/Lib/idlelib/CallTipWindow.py @@ -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 = "<>" HIDE_SEQUENCES = ("", "") @@ -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 diff --git a/Lib/idlelib/ClassBrowser.py b/Lib/idlelib/ClassBrowser.py index 6183be92ae..a0e782e0f8 100644 --- a/Lib/idlelib/ClassBrowser.py +++ b/Lib/idlelib/ClassBrowser.py @@ -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 = {} diff --git a/Lib/idlelib/Debugger.py b/Lib/idlelib/Debugger.py index 94a8cb2514..71045dde55 100644 --- a/Lib/idlelib/Debugger.py +++ b/Lib/idlelib/Debugger.py @@ -1,6 +1,5 @@ import os import bdb -import types from Tkinter import * from idlelib.WindowList import ListedToplevel from idlelib.ScrolledList import ScrolledList diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 67ab1f653d..173751e5c4 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -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