Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b2f6548

Browse filesBrowse files
authored
Merge branch 'main' into fix-unused-vars-in-email
2 parents 76f5222 + b097925 commit b2f6548
Copy full SHA for b2f6548

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

48 files changed

+14
-85
lines changed

‎Lib/_pylong.py

Copy file name to clipboardExpand all lines: Lib/_pylong.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
tricky or non-obvious code is not worth it. For people looking for
1313
maximum performance, they should use something like gmpy2."""
1414

15-
import sys
1615
import re
1716
import decimal
1817

‎Lib/concurrent/futures/process.py

Copy file name to clipboardExpand all lines: Lib/concurrent/futures/process.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
from concurrent.futures import _base
5050
import queue
5151
import multiprocessing as mp
52+
# This import is required to load the multiprocessing.connection submodule
53+
# so that it can be accessed later as `mp.connection`
5254
import multiprocessing.connection
5355
from multiprocessing.queues import Queue
5456
import threading

‎Lib/dataclasses.py

Copy file name to clipboardExpand all lines: Lib/dataclasses.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import types
55
import inspect
66
import keyword
7-
import builtins
87
import functools
98
import itertools
109
import abc

‎Lib/email/__init__.py

Copy file name to clipboardExpand all lines: Lib/email/__init__.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
]
2626

2727

28-
2928
# Some convenience routines. Don't import Parser and Message as side-effects
3029
# of importing email since those cascadingly import most of the rest of the
3130
# email package.

‎Lib/email/base64mime.py

Copy file name to clipboardExpand all lines: Lib/email/base64mime.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
MISC_LEN = 7
4646

4747

48-
4948
# Helpers
5049
def header_length(bytearray):
5150
"""Return the length of s when it is encoded with base64."""
@@ -57,7 +56,6 @@ def header_length(bytearray):
5756
return n
5857

5958

60-
6159
def header_encode(header_bytes, charset='iso-8859-1'):
6260
"""Encode a single header line with Base64 encoding in a given charset.
6361
@@ -72,7 +70,6 @@ def header_encode(header_bytes, charset='iso-8859-1'):
7270
return '=?%s?b?%s?=' % (charset, encoded)
7371

7472

75-
7673
def body_encode(s, maxlinelen=76, eol=NL):
7774
r"""Encode a string with base64.
7875
@@ -98,7 +95,6 @@ def body_encode(s, maxlinelen=76, eol=NL):
9895
return EMPTYSTRING.join(encvec)
9996

10097

101-
10298
def decode(string):
10399
"""Decode a raw base64 string, returning a bytes object.
104100

‎Lib/email/charset.py

Copy file name to clipboardExpand all lines: Lib/email/charset.py
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from email.encoders import encode_7or8bit
1919

2020

21-
2221
# Flags for types of header encodings
2322
QP = 1 # Quoted-Printable
2423
BASE64 = 2 # Base64
@@ -32,7 +31,6 @@
3231
EMPTYSTRING = ''
3332

3433

35-
3634
# Defaults
3735
CHARSETS = {
3836
# input header enc body enc output conv
@@ -104,7 +102,6 @@
104102
}
105103

106104

107-
108105
# Convenience functions for extending the above mappings
109106
def add_charset(charset, header_enc=None, body_enc=None, output_charset=None):
110107
"""Add character set properties to the global registry.
@@ -153,7 +150,6 @@ def add_codec(charset, codecname):
153150
CODEC_MAP[charset] = codecname
154151

155152

156-
157153
# Convenience function for encoding strings, taking into account
158154
# that they might be unknown-8bit (ie: have surrogate-escaped bytes)
159155
def _encode(string, codec):
@@ -163,7 +159,6 @@ def _encode(string, codec):
163159
return string.encode(codec)
164160

165161

166-
167162
class Charset:
168163
"""Map character sets to their email properties.
169164

‎Lib/email/encoders.py

Copy file name to clipboardExpand all lines: Lib/email/encoders.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from quopri import encodestring as _encodestring
1717

1818

19-
2019
def _qencode(s):
2120
enc = _encodestring(s, quotetabs=True)
2221
# Must encode spaces, which quopri.encodestring() doesn't do
@@ -34,7 +33,6 @@ def encode_base64(msg):
3433
msg['Content-Transfer-Encoding'] = 'base64'
3534

3635

37-
3836
def encode_quopri(msg):
3937
"""Encode the message's payload in quoted-printable.
4038
@@ -46,7 +44,6 @@ def encode_quopri(msg):
4644
msg['Content-Transfer-Encoding'] = 'quoted-printable'
4745

4846

49-
5047
def encode_7or8bit(msg):
5148
"""Set the Content-Transfer-Encoding header to 7bit or 8bit."""
5249
orig = msg.get_payload(decode=True)
@@ -64,6 +61,5 @@ def encode_7or8bit(msg):
6461
msg['Content-Transfer-Encoding'] = '7bit'
6562

6663

67-
6864
def encode_noop(msg):
6965
"""Do nothing."""

‎Lib/email/feedparser.py

Copy file name to clipboardExpand all lines: Lib/email/feedparser.py
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
NeedMoreData = object()
4242

4343

44-
4544
class BufferedSubFile(object):
4645
"""A file-ish object that can have new data loaded into it.
4746
@@ -132,7 +131,6 @@ def __next__(self):
132131
return line
133132

134133

135-
136134
class FeedParser:
137135
"""A feed-style parser of email."""
138136

‎Lib/email/generator.py

Copy file name to clipboardExpand all lines: Lib/email/generator.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
fcre = re.compile(r'^From ', re.MULTILINE)
2323

2424

25-
2625
class Generator:
2726
"""Generates output from a Message object tree.
2827
@@ -392,7 +391,7 @@ def _make_boundary(cls, text=None):
392391
def _compile_re(cls, s, flags):
393392
return re.compile(s, flags)
394393

395-
394+
396395
class BytesGenerator(Generator):
397396
"""Generates a bytes version of a Message object tree.
398397
@@ -443,7 +442,6 @@ def _compile_re(cls, s, flags):
443442
return re.compile(s.encode('ascii'), flags)
444443

445444

446-
447445
_FMT = '[Non-text (%(type)s) part of message omitted, filename %(filename)s]'
448446

449447
class DecodedGenerator(Generator):
@@ -503,7 +501,6 @@ def _dispatch(self, msg):
503501
}, file=self)
504502

505503

506-
507504
# Helper used by Generator._make_boundary
508505
_width = len(repr(sys.maxsize-1))
509506
_fmt = '%%0%dd' % _width

‎Lib/email/header.py

Copy file name to clipboardExpand all lines: Lib/email/header.py
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@
5252
_embedded_header = re.compile(r'\n[^ \t]+:')
5353

5454

55-
5655
# Helpers
5756
_max_append = email.quoprimime._max_append
5857

5958

60-
6159
def decode_header(header):
6260
"""Decode a message header value without converting charset.
6361
@@ -152,7 +150,6 @@ def decode_header(header):
152150
return collapsed
153151

154152

155-
156153
def make_header(decoded_seq, maxlinelen=None, header_name=None,
157154
continuation_ws=' '):
158155
"""Create a Header from a sequence of pairs as returned by decode_header()
@@ -175,7 +172,6 @@ def make_header(decoded_seq, maxlinelen=None, header_name=None,
175172
return h
176173

177174

178-
179175
class Header:
180176
def __init__(self, s=None, charset=None,
181177
maxlinelen=None, header_name=None,
@@ -409,7 +405,6 @@ def _normalize(self):
409405
self._chunks = chunks
410406

411407

412-
413408
class _ValueFormatter:
414409
def __init__(self, headerlen, maxlen, continuation_ws, splitchars):
415410
self._maxlen = maxlen

‎Lib/email/iterators.py

Copy file name to clipboardExpand all lines: Lib/email/iterators.py
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from io import StringIO
1616

1717

18-
1918
# This function will become a method of the Message class
2019
def walk(self):
2120
"""Walk over the message tree, yielding each subpart.
@@ -29,7 +28,6 @@ def walk(self):
2928
yield from subpart.walk()
3029

3130

32-
3331
# These two functions are imported into the Iterators.py interface module.
3432
def body_line_iterator(msg, decode=False):
3533
"""Iterate over the parts, returning string payloads line-by-line.
@@ -55,7 +53,6 @@ def typed_subpart_iterator(msg, maintype='text', subtype=None):
5553
yield subpart
5654

5755

58-
5956
def _structure(msg, fp=None, level=0, include_default=False):
6057
"""A handy debugging aid"""
6158
if fp is None:

‎Lib/email/mime/base.py

Copy file name to clipboardExpand all lines: Lib/email/mime/base.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from email import message
1212

1313

14-
1514
class MIMEBase(message.Message):
1615
"""Base class for MIME specializations."""
1716

‎Lib/email/mime/message.py

Copy file name to clipboardExpand all lines: Lib/email/mime/message.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from email.mime.nonmultipart import MIMENonMultipart
1111

1212

13-
1413
class MIMEMessage(MIMENonMultipart):
1514
"""Class representing message/* MIME documents."""
1615

‎Lib/email/mime/multipart.py

Copy file name to clipboardExpand all lines: Lib/email/mime/multipart.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from email.mime.base import MIMEBase
1010

1111

12-
1312
class MIMEMultipart(MIMEBase):
1413
"""Base class for MIME multipart/* type messages."""
1514

‎Lib/email/mime/nonmultipart.py

Copy file name to clipboardExpand all lines: Lib/email/mime/nonmultipart.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from email.mime.base import MIMEBase
1111

1212

13-
1413
class MIMENonMultipart(MIMEBase):
1514
"""Base class for MIME non-multipart type messages."""
1615

‎Lib/email/parser.py

Copy file name to clipboardExpand all lines: Lib/email/parser.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,14 @@ def parsestr(self, text, headersonly=False):
6464
return self.parse(StringIO(text), headersonly=headersonly)
6565

6666

67-
6867
class HeaderParser(Parser):
6968
def parse(self, fp, headersonly=True):
7069
return Parser.parse(self, fp, True)
7170

7271
def parsestr(self, text, headersonly=True):
7372
return Parser.parsestr(self, text, True)
7473

75-
74+
7675
class BytesParser:
7776

7877
def __init__(self, *args, **kw):

‎Lib/importlib/_abc.py

Copy file name to clipboardExpand all lines: Lib/importlib/_abc.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Subset of importlib.abc used to reduce importlib.util imports."""
22
from . import _bootstrap
33
import abc
4-
import warnings
54

65

76
class Loader(metaclass=abc.ABCMeta):

‎Lib/sysconfig.py

Copy file name to clipboardExpand all lines: Lib/sysconfig.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
import sys
55
import threading
6-
from os.path import pardir, realpath
6+
from os.path import realpath
77

88
__all__ = [
99
'get_config_h_filename',

‎Lib/test/_test_venv_multiprocessing.py

Copy file name to clipboardExpand all lines: Lib/test/_test_venv_multiprocessing.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import multiprocessing
22
import random
33
import sys
4-
import time
54

65
def fill_queue(queue, code):
76
queue.put(code)

‎Lib/test/fork_wait.py

Copy file name to clipboardExpand all lines: Lib/test/fork_wait.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
active threads survive in the child after a fork(); this is an error.
1010
"""
1111

12-
import os, sys, time, unittest
12+
import os, time, unittest
1313
import threading
1414
from test import support
1515
from test.support import threading_helper

‎Lib/test/test__xxinterpchannels.py

Copy file name to clipboardExpand all lines: Lib/test/test__xxinterpchannels.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from collections import namedtuple
22
import contextlib
3-
import os
43
import sys
54
from textwrap import dedent
65
import threading

‎Lib/test/test__xxsubinterpreters.py

Copy file name to clipboardExpand all lines: Lib/test/test__xxsubinterpreters.py
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
from collections import namedtuple
21
import contextlib
32
import itertools
43
import os
54
import pickle
65
import sys
76
from textwrap import dedent
87
import threading
9-
import time
108
import unittest
119

1210
import _testcapi

‎Lib/test/test_asyncgen.py

Copy file name to clipboardExpand all lines: Lib/test/test_asyncgen.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import types
33
import unittest
44
import contextlib
5-
import warnings
65

76
from test.support.import_helper import import_module
87
from test.support import gc_collect, requires_working_socket

‎Lib/test/test_asyncio/test_ssl.py

Copy file name to clipboardExpand all lines: Lib/test/test_asyncio/test_ssl.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import asyncio.sslproto
32
import contextlib
43
import gc
54
import logging

‎Lib/test/test_asyncio/test_subprocess.py

Copy file name to clipboardExpand all lines: Lib/test/test_asyncio/test_subprocess.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import shutil
32
import signal
43
import sys
54
import unittest

‎Lib/test/test_ctypes/test_callbacks.py

Copy file name to clipboardExpand all lines: Lib/test/test_ctypes/test_callbacks.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
import functools
32
import unittest
43
from test import support

‎Lib/test/test_dataclasses.py

Copy file name to clipboardExpand all lines: Lib/test/test_dataclasses.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2261,7 +2261,6 @@ def test_base_has_init(self):
22612261
class B:
22622262
def __init__(self):
22632263
self.z = 100
2264-
pass
22652264

22662265
# Make sure that declaring this class doesn't raise an error.
22672266
# The issue is that we can't override __init__ in our class,

‎Lib/test/test_enum.py

Copy file name to clipboardExpand all lines: Lib/test/test_enum.py
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from test import support
2121
from test.support import ALWAYS_EQ
2222
from test.support import threading_helper
23-
from textwrap import dedent
2423
from datetime import timedelta
2524

2625
python_version = sys.version_info[:2]
@@ -1187,7 +1186,6 @@ class MyEnum(HexInt, enum.Enum):
11871186
#
11881187
class SillyInt(HexInt):
11891188
__qualname__ = 'SillyInt'
1190-
pass
11911189
class MyOtherEnum(SillyInt, enum.Enum):
11921190
__qualname__ = 'MyOtherEnum'
11931191
D = 4

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.