summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-07-01 22:52:37 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-07-01 22:52:37 (GMT)
commit44f09ebd0f9914db8ad20d54a1d1f07164b95a1f (patch)
tree15e7589f605e0c7fa71248d024f6302c8d3c95bd /Lib/idlelib
parentf18f87111b8f34b7344529fbc4f7dfd2c94bee2f (diff)
downloadcpython-44f09ebd0f9914db8ad20d54a1d1f07164b95a1f.zip
cpython-44f09ebd0f9914db8ad20d54a1d1f07164b95a1f.tar.gz
cpython-44f09ebd0f9914db8ad20d54a1d1f07164b95a1f.tar.bz2
Delete a few unused names suggested by pyflakes.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/CallTipWindow.py12
-rw-r--r--Lib/idlelib/ClassBrowser.py2
-rw-r--r--Lib/idlelib/Debugger.py1
-rw-r--r--Lib/idlelib/configDialog.py3
-rw-r--r--Lib/idlelib/configHandler.py2
5 files changed, 10 insertions, 10 deletions
diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py
index aacfa00..84d22fd 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 ee1a70f..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 as msg:
+ except ImportError:
return []
items = []
self.classes = {}
diff --git a/Lib/idlelib/Debugger.py b/Lib/idlelib/Debugger.py
index ca98b10..6875197 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/configDialog.py b/Lib/idlelib/configDialog.py
index 30238af..72dd6b9 100644
--- a/Lib/idlelib/configDialog.py
+++ b/Lib/idlelib/configDialog.py
@@ -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)
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py
index 8608f7c..745d550 100644
--- a/Lib/idlelib/configHandler.py
+++ b/Lib/idlelib/configHandler.py
@@ -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