From: Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) Date: Sat, 10 Nov 2018 06:45:31 +0000 (+0530) Subject: bpo-35202: Remove unused imports in idlelib (GH-10438) X-Git-Tag: v3.8.0a1~528 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43a74abb3a87092a7fd6c71042eafb977d70d8e0;p=python bpo-35202: Remove unused imports in idlelib (GH-10438) --- 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