mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Delete a few unused names suggested by pyflakes.
This commit is contained in:
parent
f18f87111b
commit
44f09ebd0f
5 changed files with 10 additions and 10 deletions
|
@ -2,9 +2,8 @@
|
||||||
|
|
||||||
After ToolTip.py, which uses ideas gleaned from PySol
|
After ToolTip.py, which uses ideas gleaned from PySol
|
||||||
Used by the CallTips IDLE extension.
|
Used by the CallTips IDLE extension.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from tkinter import *
|
from tkinter import Toplevel, Label, LEFT, SOLID, TclError
|
||||||
|
|
||||||
HIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-hide>>"
|
HIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-hide>>"
|
||||||
HIDE_SEQUENCES = ("<Key-Escape>", "<FocusOut>")
|
HIDE_SEQUENCES = ("<Key-Escape>", "<FocusOut>")
|
||||||
|
@ -133,13 +132,16 @@ class CallTip:
|
||||||
return bool(self.tipwindow)
|
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 = Tk()
|
||||||
root.title("Test calltips")
|
root.title("Test calltips")
|
||||||
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
|
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
|
||||||
root.geometry("+%d+%d"%(x, y + 150))
|
root.geometry("+%d+%d"%(x, y + 150))
|
||||||
|
|
||||||
class MyEditWin: # comparenceptually an editor_window
|
class MyEditWin: # conceptually an editor_window
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
text = self.text = Text(root)
|
text = self.text = Text(root)
|
||||||
text.pack(side=LEFT, fill=BOTH, expand=1)
|
text.pack(side=LEFT, fill=BOTH, expand=1)
|
||||||
|
@ -161,7 +163,7 @@ def _calltip_window(parent):
|
||||||
def calltip_hide(self, event):
|
def calltip_hide(self, event):
|
||||||
self.calltip.hidetip()
|
self.calltip.hidetip()
|
||||||
|
|
||||||
editwin = MyEditWin()
|
MyEditWin()
|
||||||
|
|
||||||
if __name__=='__main__':
|
if __name__=='__main__':
|
||||||
from idlelib.idle_test.htest import run
|
from idlelib.idle_test.htest import run
|
||||||
|
|
|
@ -101,7 +101,7 @@ class ModuleBrowserTreeItem(TreeItem):
|
||||||
return []
|
return []
|
||||||
try:
|
try:
|
||||||
dict = pyclbr.readmodule_ex(name, [dir] + sys.path)
|
dict = pyclbr.readmodule_ex(name, [dir] + sys.path)
|
||||||
except ImportError as msg:
|
except ImportError:
|
||||||
return []
|
return []
|
||||||
items = []
|
items = []
|
||||||
self.classes = {}
|
self.classes = {}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import os
|
import os
|
||||||
import bdb
|
import bdb
|
||||||
import types
|
|
||||||
from tkinter import *
|
from tkinter import *
|
||||||
from idlelib.WindowList import ListedToplevel
|
from idlelib.WindowList import ListedToplevel
|
||||||
from idlelib.ScrolledList import ScrolledList
|
from idlelib.ScrolledList import ScrolledList
|
||||||
|
|
|
@ -13,7 +13,6 @@ from tkinter import *
|
||||||
import tkinter.messagebox as tkMessageBox
|
import tkinter.messagebox as tkMessageBox
|
||||||
import tkinter.colorchooser as tkColorChooser
|
import tkinter.colorchooser as tkColorChooser
|
||||||
import tkinter.font as tkFont
|
import tkinter.font as tkFont
|
||||||
import copy
|
|
||||||
|
|
||||||
from idlelib.configHandler import idleConf
|
from idlelib.configHandler import idleConf
|
||||||
from idlelib.dynOptionMenuWidget import DynOptionMenu
|
from idlelib.dynOptionMenuWidget import DynOptionMenu
|
||||||
|
@ -679,7 +678,7 @@ class ConfigDialog(Toplevel):
|
||||||
if self.listBindings.curselection():
|
if self.listBindings.curselection():
|
||||||
reselect=1
|
reselect=1
|
||||||
listIndex=self.listBindings.index(ANCHOR)
|
listIndex=self.listBindings.index(ANCHOR)
|
||||||
keySet=idleConf.GetKeySet(keySetName)
|
# keySet=idleConf.GetKeySet(keySetName) # unused, delete?
|
||||||
bindNames = list(keySet.keys())
|
bindNames = list(keySet.keys())
|
||||||
bindNames.sort()
|
bindNames.sort()
|
||||||
self.listBindings.delete(0,END)
|
self.listBindings.delete(0,END)
|
||||||
|
|
|
@ -20,7 +20,7 @@ configuration problem notification and resolution.
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from configparser import ConfigParser, NoOptionError, NoSectionError
|
from configparser import ConfigParser
|
||||||
|
|
||||||
class InvalidConfigType(Exception): pass
|
class InvalidConfigType(Exception): pass
|
||||||
class InvalidConfigSet(Exception): pass
|
class InvalidConfigSet(Exception): pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue