From 43a74abb3a87092a7fd6c71042eafb977d70d8e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Srinivas=20=20Thatiparthy=20=28=E0=B0=B6=E0=B1=8D=E0=B0=B0?= =?utf8?q?=E0=B1=80=E0=B0=A8=E0=B0=BF=E0=B0=B5=E0=B0=BE=E0=B0=B8=E0=B1=8D?= =?utf8?q?=20=20=E0=B0=A4=E0=B0=BE=E0=B0=9F=E0=B0=BF=E0=B0=AA=E0=B0=B0?= =?utf8?q?=E0=B1=8D=E0=B0=A4=E0=B0=BF=29?= Date: Sat, 10 Nov 2018 12:15:31 +0530 Subject: [PATCH] bpo-35202: Remove unused imports in idlelib (GH-10438) --- Lib/idlelib/codecontext.py | 2 +- Lib/idlelib/filelist.py | 1 - Lib/idlelib/idle_test/test_config.py | 1 - Lib/idlelib/idle_test/test_config_key.py | 1 - Lib/idlelib/idle_test/test_rpc.py | 1 - Lib/idlelib/pyparse.py | 1 - Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst | 1 + 7 files changed, 2 insertions(+), 6 deletions(-) create mode 100644 Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst diff --git a/Lib/idlelib/codecontext.py b/Lib/idlelib/codecontext.py index 7c88a4d015..ef8852852d 100644 --- a/Lib/idlelib/codecontext.py +++ b/Lib/idlelib/codecontext.py @@ -13,7 +13,7 @@ import re from sys import maxsize as INFINITY import tkinter -from tkinter.constants import TOP, LEFT, X, W, SUNKEN +from tkinter.constants import TOP, X, SUNKEN from idlelib.config import idleConf diff --git a/Lib/idlelib/filelist.py b/Lib/idlelib/filelist.py index 52628392e6..0d200854ef 100644 --- a/Lib/idlelib/filelist.py +++ b/Lib/idlelib/filelist.py @@ -115,7 +115,6 @@ def _test(): # TODO check and convert to htest from tkinter import Tk from idlelib.editor import fixwordbreaks from idlelib.run import fix_scaling - import sys root = Tk() fix_scaling(root) fixwordbreaks(root) diff --git a/Lib/idlelib/idle_test/test_config.py b/Lib/idlelib/idle_test/test_config.py index 8c9197284e..169d054efd 100644 --- a/Lib/idlelib/idle_test/test_config.py +++ b/Lib/idlelib/idle_test/test_config.py @@ -4,7 +4,6 @@ Much of IdleConf is also exercised by ConfigDialog and test_configdialog. """ from idlelib import config -import copy import sys import os import tempfile diff --git a/Lib/idlelib/idle_test/test_config_key.py b/Lib/idlelib/idle_test/test_config_key.py index 08471666a4..5031daadee 100644 --- a/Lib/idlelib/idle_test/test_config_key.py +++ b/Lib/idlelib/idle_test/test_config_key.py @@ -2,7 +2,6 @@ from idlelib import config_key from test.support import requires -import sys import unittest from tkinter import Tk from idlelib.idle_test.mock_idle import Func diff --git a/Lib/idlelib/idle_test/test_rpc.py b/Lib/idlelib/idle_test/test_rpc.py index 48be65ba10..81eff398c7 100644 --- a/Lib/idlelib/idle_test/test_rpc.py +++ b/Lib/idlelib/idle_test/test_rpc.py @@ -3,7 +3,6 @@ from idlelib import rpc import unittest -import marshal class CodePicklerTest(unittest.TestCase): diff --git a/Lib/idlelib/pyparse.py b/Lib/idlelib/pyparse.py index 1eeb9154d9..81e7f53980 100644 --- a/Lib/idlelib/pyparse.py +++ b/Lib/idlelib/pyparse.py @@ -11,7 +11,6 @@ _closere - line that must be followed by dedent. _chew_ordinaryre - non-special characters. """ import re -import sys # Reason last statement is continued (or C_NONE if it's not). (C_NONE, C_BACKSLASH, C_STRING_FIRST_LINE, diff --git a/Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst b/Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst new file mode 100644 index 0000000000..1824536f3d --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst @@ -0,0 +1 @@ +Remove unused imports from lib/idlelib -- 2.40.0