[Python-checkins] cpython (2.7): idlelib: remove unused names and imports (one is a duplicate import).
terry.reedy
python-checkins at python.org
Fri May 15 00:12:21 CEST 2015
https://hg.python.org/cpython/rev/a980da5f79f9
changeset: 96052:a980da5f79f9
branch: 2.7
parent: 96026:68d653f9a2c9
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Thu May 14 18:10:30 2015 -0400
summary:
idlelib: remove unused names and imports (one is a duplicate import).
files:
Lib/idlelib/IOBinding.py | 7 +++----
Lib/idlelib/RemoteDebugger.py | 1 -
Lib/idlelib/SearchDialog.py | 2 +-
Lib/idlelib/TreeWidget.py | 2 +-
Lib/idlelib/configDialog.py | 1 -
5 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -6,7 +6,6 @@
# which will only understand the local convention.
import os
-import types
import pipes
import sys
import codecs
@@ -391,7 +390,7 @@
return False
def encode(self, chars):
- if isinstance(chars, types.StringType):
+ if isinstance(chars, str):
# This is either plain ASCII, or Tk was returning mixed-encoding
# text to us. Don't try to guess further.
return chars
@@ -568,7 +567,7 @@
"Update recent file list on all editor windows"
self.editwin.update_recent_files_list(filename)
-def _io_binding(parent):
+def _io_binding(parent): # htest #
root = Tk()
root.title("Test IOBinding")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
@@ -591,7 +590,7 @@
text.pack()
text.focus_set()
editwin = MyEditWin(text)
- io = IOBinding(editwin)
+ IOBinding(editwin)
if __name__ == "__main__":
from idlelib.idle_test.htest import run
diff --git a/Lib/idlelib/RemoteDebugger.py b/Lib/idlelib/RemoteDebugger.py
--- a/Lib/idlelib/RemoteDebugger.py
+++ b/Lib/idlelib/RemoteDebugger.py
@@ -21,7 +21,6 @@
"""
import types
-from idlelib import rpc
from idlelib import Debugger
debugging = 0
diff --git a/Lib/idlelib/SearchDialog.py b/Lib/idlelib/SearchDialog.py
--- a/Lib/idlelib/SearchDialog.py
+++ b/Lib/idlelib/SearchDialog.py
@@ -23,7 +23,7 @@
class SearchDialog(SearchDialogBase):
def create_widgets(self):
- f = SearchDialogBase.create_widgets(self)
+ SearchDialogBase.create_widgets(self)
self.make_button("Find Next", self.default_command, 1)
def default_command(self, event=None):
diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py
--- a/Lib/idlelib/TreeWidget.py
+++ b/Lib/idlelib/TreeWidget.py
@@ -246,7 +246,7 @@
else:
self.edit_finish()
try:
- label = self.label
+ self.label
except AttributeError:
# padding carefully selected (on Windows) to match Entry widget:
self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2)
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py
--- a/Lib/idlelib/configDialog.py
+++ b/Lib/idlelib/configDialog.py
@@ -14,7 +14,6 @@
from idlelib.configHandler import idleConf
from idlelib.dynOptionMenuWidget import DynOptionMenu
-from idlelib.tabbedpages import TabbedPageSet
from idlelib.keybindingDialog import GetKeysDialog
from idlelib.configSectionNameDialog import GetCfgSectionNameDialog
from idlelib.configHelpSourceEdit import GetHelpSourceDialog
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list