From 9bc505616b4bc88b29993f351218c3083bd3f3e8 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Tue, 1 Jul 2014 18:52:31 -0400 Subject: Delete a few unused names suggested by pyflakes. --- Lib/idlelib/CallTipWindow.py | 12 +++++++----- Lib/idlelib/ClassBrowser.py | 2 +- Lib/idlelib/Debugger.py | 1 - Lib/idlelib/configHandler.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py index 265b2fa..2077407 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 6183be9..a0e782e 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 94a8cb2..71045dd 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 67ab1f6..173751e 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 -- cgit v0.12