From: Benjamin Peterson Date: Tue, 28 Jun 2011 15:25:04 +0000 (-0500) Subject: remove unused imports (closes #12432) X-Git-Tag: v3.3.0a1~2024 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=274271d1ae71dbd1177b54a5def45fed3ecb501f;p=python remove unused imports (closes #12432) A patch from Vincent Legoll. --- diff --git a/Lib/binhex.py b/Lib/binhex.py index 999a675513..7bf9278430 100644 --- a/Lib/binhex.py +++ b/Lib/binhex.py @@ -23,7 +23,6 @@ hexbin(inputfilename, outputfilename) # import io import os -import sys import struct import binascii diff --git a/Lib/cgitb.py b/Lib/cgitb.py index 7b52c8e74c..e3ce2cb9d6 100644 --- a/Lib/cgitb.py +++ b/Lib/cgitb.py @@ -31,7 +31,6 @@ import tempfile import time import tokenize import traceback -import types def reset(): """Return a string that resets the CGI and browser to a known state.""" diff --git a/Lib/contextlib.py b/Lib/contextlib.py index 5ebbbc6583..2f8f00d296 100644 --- a/Lib/contextlib.py +++ b/Lib/contextlib.py @@ -2,7 +2,6 @@ import sys from functools import wraps -from warnings import warn __all__ = ["contextmanager", "closing", "ContextDecorator"] diff --git a/Lib/glob.py b/Lib/glob.py index 36d493d7a8..c5f5f69b2d 100644 --- a/Lib/glob.py +++ b/Lib/glob.py @@ -1,5 +1,6 @@ """Filename globbing utility.""" +import sys import os import re import fnmatch diff --git a/Lib/inspect.py b/Lib/inspect.py index 80802e4181..9898b114aa 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -33,7 +33,6 @@ import sys import os import types import itertools -import string import re import imp import tokenize diff --git a/Lib/textwrap.py b/Lib/textwrap.py index f4886a1277..f014cb0cf3 100644 --- a/Lib/textwrap.py +++ b/Lib/textwrap.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import string, re +import re __all__ = ['TextWrapper', 'wrap', 'fill', 'dedent'] diff --git a/Lib/turtle.py b/Lib/turtle.py index 2ff54278e2..a0c9ae6c0c 100644 --- a/Lib/turtle.py +++ b/Lib/turtle.py @@ -108,7 +108,6 @@ import tkinter as TK import types import math import time -import os import inspect from os.path import isfile, split, join