Commit 2733618f authored by Terry Jan Reedy's avatar Terry Jan Reedy

idlelib: remove unused names and imports (one is a duplicate import).

parent 82796193
...@@ -5,7 +5,6 @@ import sys ...@@ -5,7 +5,6 @@ import sys
from tkinter import StringVar, BooleanVar, Checkbutton # for GrepDialog from tkinter import StringVar, BooleanVar, Checkbutton # for GrepDialog
from tkinter import Tk, Text, Button, SEL, END # for htest from tkinter import Tk, Text, Button, SEL, END # for htest
from idlelib import SearchEngine from idlelib import SearchEngine
import itertools
from idlelib.SearchDialogBase import SearchDialogBase from idlelib.SearchDialogBase import SearchDialogBase
# Importing OutputWindow fails due to import loop # Importing OutputWindow fails due to import loop
# EditorWindow -> GrepDialop -> OutputWindow -> EditorWindow # EditorWindow -> GrepDialop -> OutputWindow -> EditorWindow
......
import os import os
import types
import shlex import shlex
import sys import sys
import codecs import codecs
...@@ -525,7 +524,7 @@ class IOBinding: ...@@ -525,7 +524,7 @@ class IOBinding:
if self.editwin.flist: if self.editwin.flist:
self.editwin.update_recent_files_list(filename) self.editwin.update_recent_files_list(filename)
def _io_binding(parent): def _io_binding(parent): # htest #
root = Tk() root = Tk()
root.title("Test IOBinding") root.title("Test IOBinding")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry()))) width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
...@@ -548,7 +547,7 @@ def _io_binding(parent): ...@@ -548,7 +547,7 @@ def _io_binding(parent):
text.pack() text.pack()
text.focus_set() text.focus_set()
editwin = MyEditWin(text) editwin = MyEditWin(text)
io = IOBinding(editwin) IOBinding(editwin)
if __name__ == "__main__": if __name__ == "__main__":
from idlelib.idle_test.htest import run from idlelib.idle_test.htest import run
......
import re import re
import sys import sys
from collections import Mapping from collections import Mapping
from functools import partial
# Reason last stmt is continued (or C_NONE if it's not). # Reason last stmt is continued (or C_NONE if it's not).
(C_NONE, C_BACKSLASH, C_STRING_FIRST_LINE, (C_NONE, C_BACKSLASH, C_STRING_FIRST_LINE,
......
...@@ -21,7 +21,6 @@ barrier, in particular frame and traceback objects. ...@@ -21,7 +21,6 @@ barrier, in particular frame and traceback objects.
""" """
import types import types
from idlelib import rpc
from idlelib import Debugger from idlelib import Debugger
debugging = 0 debugging = 0
......
...@@ -18,13 +18,11 @@ XXX GvR Redesign this interface (yet again) as follows: ...@@ -18,13 +18,11 @@ XXX GvR Redesign this interface (yet again) as follows:
""" """
import os import os
import re
import string import string
import tabnanny import tabnanny
import tokenize import tokenize
import tkinter.messagebox as tkMessageBox import tkinter.messagebox as tkMessageBox
from idlelib.EditorWindow import EditorWindow from idlelib import PyShell
from idlelib import PyShell, IOBinding
from idlelib.configHandler import idleConf from idlelib.configHandler import idleConf
from idlelib import macosxSupport from idlelib import macosxSupport
......
...@@ -23,7 +23,7 @@ def find_selection(text): ...@@ -23,7 +23,7 @@ def find_selection(text):
class SearchDialog(SearchDialogBase): class SearchDialog(SearchDialogBase):
def create_widgets(self): def create_widgets(self):
f = SearchDialogBase.create_widgets(self) SearchDialogBase.create_widgets(self)
self.make_button("Find Next", self.default_command, 1) self.make_button("Find Next", self.default_command, 1)
def default_command(self, event=None): def default_command(self, event=None):
......
...@@ -245,7 +245,7 @@ class TreeNode: ...@@ -245,7 +245,7 @@ class TreeNode:
else: else:
self.edit_finish() self.edit_finish()
try: try:
label = self.label self.label
except AttributeError: except AttributeError:
# padding carefully selected (on Windows) to match Entry widget: # padding carefully selected (on Windows) to match Entry widget:
self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2) self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2)
......
...@@ -16,7 +16,6 @@ import tkinter.font as tkFont ...@@ -16,7 +16,6 @@ import tkinter.font as tkFont
from idlelib.configHandler import idleConf from idlelib.configHandler import idleConf
from idlelib.dynOptionMenuWidget import DynOptionMenu from idlelib.dynOptionMenuWidget import DynOptionMenu
from idlelib.tabbedpages import TabbedPageSet
from idlelib.keybindingDialog import GetKeysDialog from idlelib.keybindingDialog import GetKeysDialog
from idlelib.configSectionNameDialog import GetCfgSectionNameDialog from idlelib.configSectionNameDialog import GetCfgSectionNameDialog
from idlelib.configHelpSourceEdit import GetHelpSourceDialog from idlelib.configHelpSourceEdit import GetHelpSourceDialog
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment