From 95e208dce505c542b8e4f8f42c57e6d4793b6895 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 29 Apr 2020 18:47:50 -0700 Subject: [PATCH] bpo-40443: Remove unused imports in idlelib (GH-19801) (cherry picked from commit 6900f16d2207ca4fc252fa9d778ca0b13a3c95e0) Co-authored-by: Victor Stinner --- Lib/idlelib/autocomplete_w.py | 2 +- Lib/idlelib/config_key.py | 2 +- Lib/idlelib/configdialog.py | 2 +- Lib/idlelib/idle_test/test_sidebar.py | 1 - Lib/idlelib/idle_test/test_squeezer.py | 1 - Lib/idlelib/textview.py | 1 - 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Lib/idlelib/autocomplete_w.py b/Lib/idlelib/autocomplete_w.py index 0643c092c6e548..fe7a6be83d586b 100644 --- a/Lib/idlelib/autocomplete_w.py +++ b/Lib/idlelib/autocomplete_w.py @@ -4,7 +4,7 @@ import platform from tkinter import * -from tkinter.ttk import Frame, Scrollbar +from tkinter.ttk import Scrollbar from idlelib.autocomplete import FILES, ATTRS from idlelib.multicall import MC_SHIFT diff --git a/Lib/idlelib/config_key.py b/Lib/idlelib/config_key.py index 4478323fcc2c51..7510aa9f3d8786 100644 --- a/Lib/idlelib/config_key.py +++ b/Lib/idlelib/config_key.py @@ -1,7 +1,7 @@ """ Dialog for building Tkinter accelerator key bindings """ -from tkinter import Toplevel, Listbox, Text, StringVar, TclError +from tkinter import Toplevel, Listbox, StringVar, TclError from tkinter.ttk import Frame, Button, Checkbutton, Entry, Label, Scrollbar from tkinter import messagebox import string diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index 9d5c2cde04b240..82596498d34611 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -11,7 +11,7 @@ """ import re -from tkinter import (Toplevel, Listbox, Text, Scale, Canvas, +from tkinter import (Toplevel, Listbox, Scale, Canvas, StringVar, BooleanVar, IntVar, TRUE, FALSE, TOP, BOTTOM, RIGHT, LEFT, SOLID, GROOVE, NONE, BOTH, X, Y, W, E, EW, NS, NSEW, NW, diff --git a/Lib/idlelib/idle_test/test_sidebar.py b/Lib/idlelib/idle_test/test_sidebar.py index 0f5b4c71223240..2974a9a7b09874 100644 --- a/Lib/idlelib/idle_test/test_sidebar.py +++ b/Lib/idlelib/idle_test/test_sidebar.py @@ -1,6 +1,5 @@ """Test sidebar, coverage 93%""" import idlelib.sidebar -from sys import platform from itertools import chain import unittest import unittest.mock diff --git a/Lib/idlelib/idle_test/test_squeezer.py b/Lib/idlelib/idle_test/test_squeezer.py index 1af2ce832845cd..e3912f4bbbec89 100644 --- a/Lib/idlelib/idle_test/test_squeezer.py +++ b/Lib/idlelib/idle_test/test_squeezer.py @@ -1,6 +1,5 @@ "Test squeezer, coverage 95%" -from collections import namedtuple from textwrap import dedent from tkinter import Text, Tk import unittest diff --git a/Lib/idlelib/textview.py b/Lib/idlelib/textview.py index 808a2aefab4f71..a66c1a4309a617 100644 --- a/Lib/idlelib/textview.py +++ b/Lib/idlelib/textview.py @@ -6,7 +6,6 @@ from tkinter.ttk import Frame, Scrollbar, Button from tkinter.messagebox import showerror -from functools import update_wrapper from idlelib.colorizer import color_config