[Python-checkins] gh-84623: Remove unused imports in idlelib (GH-94143) (#94148)

vstinner webhook-mailer at python.org
Thu Jun 23 07:21:16 EDT 2022


https://github.com/python/cpython/commit/34be807139df0d9f46e1ab9deb7d2e59dcffa2c8
commit: 34be807139df0d9f46e1ab9deb7d2e59dcffa2c8
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: vstinner <vstinner at python.org>
date: 2022-06-23T13:21:08+02:00
summary:

gh-84623: Remove unused imports in idlelib (GH-94143) (#94148)

Remove commented code in test_debugger_r.py.

Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>
(cherry picked from commit 576dd901170af30fc50b0a7f07a388b38fd724a9)

Co-authored-by: Victor Stinner <vstinner at python.org>

Co-authored-by: Victor Stinner <vstinner at python.org>

files:
M Lib/idlelib/idle_test/test_debugger_r.py
M Lib/idlelib/idle_test/test_editor.py
M Lib/idlelib/iomenu.py

diff --git a/Lib/idlelib/idle_test/test_debugger_r.py b/Lib/idlelib/idle_test/test_debugger_r.py
index 638ebd36a7405..cf8af05fe27e7 100644
--- a/Lib/idlelib/idle_test/test_debugger_r.py
+++ b/Lib/idlelib/idle_test/test_debugger_r.py
@@ -2,28 +2,21 @@
 
 from idlelib import debugger_r
 import unittest
-from test.support import requires
-from tkinter import Tk
-
-
-class Test(unittest.TestCase):
 
+# Boilerplate likely to be needed for future test classes.
+##from test.support import requires
+##from tkinter import Tk
+##class Test(unittest.TestCase):
 ##    @classmethod
 ##    def setUpClass(cls):
 ##        requires('gui')
 ##        cls.root = Tk()
-##
 ##    @classmethod
 ##    def tearDownClass(cls):
 ##        cls.root.destroy()
-##        del cls.root
-
-    def test_init(self):
-        self.assertTrue(True)  # Get coverage of import
-
 
-# Classes GUIProxy, IdbAdapter, FrameProxy, CodeProxy, DictProxy,
-# GUIAdapter, IdbProxy plus 7 module functions.
+# GUIProxy, IdbAdapter, FrameProxy, CodeProxy, DictProxy,
+# GUIAdapter, IdbProxy, and 7 functions still need tests.
 
 class IdbAdapterTest(unittest.TestCase):
 
diff --git a/Lib/idlelib/idle_test/test_editor.py b/Lib/idlelib/idle_test/test_editor.py
index 8665d680c0118..fdb47abf43fb7 100644
--- a/Lib/idlelib/idle_test/test_editor.py
+++ b/Lib/idlelib/idle_test/test_editor.py
@@ -5,7 +5,6 @@
 from collections import namedtuple
 from test.support import requires
 from tkinter import Tk
-from idlelib.idle_test.mock_idle import Func
 
 Editor = editor.EditorWindow
 
diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py
index ad3109df84096..86ce68c06a447 100644
--- a/Lib/idlelib/iomenu.py
+++ b/Lib/idlelib/iomenu.py
@@ -9,7 +9,6 @@
 from tkinter import messagebox
 from tkinter.simpledialog import askstring
 
-import idlelib
 from idlelib.config import idleConf
 from idlelib.util import py_extensions
 
@@ -21,8 +20,7 @@
 else:
     errors = 'surrogateescape'
 
-
-
+    
 class IOBinding:
 # One instance per editor Window so methods know which to save, close.
 # Open returns focus to self.editwin if aborted.



More information about the Python-checkins mailing list