Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 03ce1c0

Browse files
committed
(Merge 3.4) Issue #20976: pyflakes: Remove unused imports
2 parents a69f0f9 + 7fa767e commit 03ce1c0

43 files changed

Lines changed: 11 additions & 64 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Lib/_strptime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import locale
1515
import calendar
1616
from re import compile as re_compile
17-
from re import IGNORECASE, ASCII
17+
from re import IGNORECASE
1818
from re import escape as re_escape
1919
from datetime import (date as datetime_date,
2020
timedelta as datetime_timedelta,

Lib/asynchat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
method) up to the terminator, and then control will be returned to
4646
you - by calling your self.found_terminator() method.
4747
"""
48-
import socket
4948
import asyncore
5049
from collections import deque
5150

Lib/compileall.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"""
1313
import os
1414
import sys
15-
import errno
1615
import importlib.util
1716
import py_compile
1817
import struct

Lib/ctypes/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def find_library(name):
8585

8686
elif os.name == "posix":
8787
# Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
88-
import re, tempfile, errno
88+
import re, tempfile
8989

9090
def _findLib_gcc(name):
9191
expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)

Lib/decimal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@
142142
# See http://speleotrove.com/decimal/
143143
__libmpdec_version__ = "2.4.0" # compatible libmpdec version
144144

145-
import copy as _copy
146145
import math as _math
147146
import numbers as _numbers
148147
import sys

Lib/difflib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
'Differ','IS_CHARACTER_JUNK', 'IS_LINE_JUNK', 'context_diff',
3131
'unified_diff', 'HtmlDiff', 'Match']
3232

33-
import warnings
3433
import heapq
3534
from collections import namedtuple as _namedtuple
3635

Lib/email/_header_value_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
import re
7171
import urllib # For urllib.parse.unquote
7272
from string import hexdigits
73-
from collections import namedtuple, OrderedDict
73+
from collections import OrderedDict
7474
from email import _encoded_words as _ew
7575
from email import errors
7676
from email import utils

Lib/email/generator.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@
1010
import sys
1111
import time
1212
import random
13-
import warnings
1413

1514
from copy import deepcopy
1615
from io import StringIO, BytesIO
17-
from email._policybase import compat32
18-
from email.header import Header
1916
from email.utils import _has_surrogates
20-
import email.charset as _charset
2117

2218
UNDERSCORE = '_'
2319
NL = '\n' # XXX: no longer used by the code below.

Lib/email/header.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ def decode_header(header):
100100
words.append((encoded, encoding, charset))
101101
# Now loop over words and remove words that consist of whitespace
102102
# between two encoded strings.
103-
import sys
104103
droplist = []
105104
for n, w in enumerate(words):
106105
if n>1 and w[1] and words[n-2][1] and words[n-1][0].isspace():
@@ -362,7 +361,6 @@ def encode(self, splitchars=';, \t', maxlinelen=None, linesep='\n'):
362361
for string, charset in self._chunks:
363362
if hasspace is not None:
364363
hasspace = string and self._nonctext(string[0])
365-
import sys
366364
if lastcs not in (None, 'us-ascii'):
367365
if not hasspace or charset not in (None, 'us-ascii'):
368366
formatter.add_transition()

Lib/email/mime/text.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
__all__ = ['MIMEText']
88

9-
from email.encoders import encode_7or8bit
109
from email.mime.nonmultipart import MIMENonMultipart
1110

1211

0 commit comments

Comments
 (0)