diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2014-07-01 22:52:31 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2014-07-01 22:52:31 (GMT) |
commit | 9bc505616b4bc88b29993f351218c3083bd3f3e8 (patch) | |
tree | e048bf96f170ba76af021b21ccc0dff4cf6f66e9 /Lib | |
parent | 5b1b38cbefa0d541e51ac17446c0cca6b5990417 (diff) | |
download | cpython-9bc505616b4bc88b29993f351218c3083bd3f3e8.zip cpython-9bc505616b4bc88b29993f351218c3083bd3f3e8.tar.gz cpython-9bc505616b4bc88b29993f351218c3083bd3f3e8.tar.bz2 |
Delete a few unused names suggested by pyflakes.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/CallTipWindow.py | 12 | ||||
-rw-r--r-- | Lib/idlelib/ClassBrowser.py | 2 | ||||
-rw-r--r-- | Lib/idlelib/Debugger.py | 1 | ||||
-rw-r--r-- | 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 = "<<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 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 |