Skip to content

Commit cd547a2

Browse files
committed
Trim trailing whitespace
1 parent 9327cf7 commit cd547a2

37 files changed

+164
-164
lines changed

Lib/email/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
]
2626

2727

28-
28+
2929
# Some convenience routines. Don't import Parser and Message as side-effects
3030
# of importing email since those cascadingly import most of the rest of the
3131
# email package.

Lib/email/base64mime.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
MISC_LEN = 7
4646

4747

48-
48+
4949
# Helpers
5050
def header_length(bytearray):
5151
"""Return the length of s when it is encoded with base64."""
@@ -57,7 +57,7 @@ def header_length(bytearray):
5757
return n
5858

5959

60-
60+
6161
def header_encode(header_bytes, charset='iso-8859-1'):
6262
"""Encode a single header line with Base64 encoding in a given charset.
6363
@@ -72,7 +72,7 @@ def header_encode(header_bytes, charset='iso-8859-1'):
7272
return '=?%s?b?%s?=' % (charset, encoded)
7373

7474

75-
75+
7676
def body_encode(s, maxlinelen=76, eol=NL):
7777
r"""Encode a string with base64.
7878
@@ -98,7 +98,7 @@ def body_encode(s, maxlinelen=76, eol=NL):
9898
return EMPTYSTRING.join(encvec)
9999

100100

101-
101+
102102
def decode(string):
103103
"""Decode a raw base64 string, returning a bytes object.
104104

Lib/email/charset.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from email.encoders import encode_7or8bit
1919

2020

21-
21+
2222
# Flags for types of header encodings
2323
QP = 1 # Quoted-Printable
2424
BASE64 = 2 # Base64
@@ -32,7 +32,7 @@
3232
EMPTYSTRING = ''
3333

3434

35-
35+
3636
# Defaults
3737
CHARSETS = {
3838
# input header enc body enc output conv
@@ -104,7 +104,7 @@
104104
}
105105

106106

107-
107+
108108
# Convenience functions for extending the above mappings
109109
def add_charset(charset, header_enc=None, body_enc=None, output_charset=None):
110110
"""Add character set properties to the global registry.
@@ -153,7 +153,7 @@ def add_codec(charset, codecname):
153153
CODEC_MAP[charset] = codecname
154154

155155

156-
156+
157157
# Convenience function for encoding strings, taking into account
158158
# that they might be unknown-8bit (ie: have surrogate-escaped bytes)
159159
def _encode(string, codec):
@@ -163,7 +163,7 @@ def _encode(string, codec):
163163
return string.encode(codec)
164164

165165

166-
166+
167167
class Charset:
168168
"""Map character sets to their email properties.
169169

Lib/email/encoders.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from quopri import encodestring as _encodestring
1717

1818

19-
19+
2020
def _qencode(s):
2121
enc = _encodestring(s, quotetabs=True)
2222
# Must encode spaces, which quopri.encodestring() doesn't do
@@ -34,7 +34,7 @@ def encode_base64(msg):
3434
msg['Content-Transfer-Encoding'] = 'base64'
3535

3636

37-
37+
3838
def encode_quopri(msg):
3939
"""Encode the message's payload in quoted-printable.
4040
@@ -46,7 +46,7 @@ def encode_quopri(msg):
4646
msg['Content-Transfer-Encoding'] = 'quoted-printable'
4747

4848

49-
49+
5050
def encode_7or8bit(msg):
5151
"""Set the Content-Transfer-Encoding header to 7bit or 8bit."""
5252
orig = msg.get_payload(decode=True)
@@ -64,6 +64,6 @@ def encode_7or8bit(msg):
6464
msg['Content-Transfer-Encoding'] = '7bit'
6565

6666

67-
67+
6868
def encode_noop(msg):
6969
"""Do nothing."""

Lib/email/feedparser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
NeedMoreData = object()
4242

4343

44-
44+
4545
class BufferedSubFile(object):
4646
"""A file-ish object that can have new data loaded into it.
4747
@@ -132,7 +132,7 @@ def __next__(self):
132132
return line
133133

134134

135-
135+
136136
class FeedParser:
137137
"""A feed-style parser of email."""
138138

Lib/email/generator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
fcre = re.compile(r'^From ', re.MULTILINE)
2323

2424

25-
25+
2626
class Generator:
2727
"""Generates output from a Message object tree.
2828
@@ -392,7 +392,7 @@ def _make_boundary(cls, text=None):
392392
def _compile_re(cls, s, flags):
393393
return re.compile(s, flags)
394394

395-
395+
396396
class BytesGenerator(Generator):
397397
"""Generates a bytes version of a Message object tree.
398398
@@ -443,7 +443,7 @@ def _compile_re(cls, s, flags):
443443
return re.compile(s.encode('ascii'), flags)
444444

445445

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

449449
class DecodedGenerator(Generator):
@@ -503,7 +503,7 @@ def _dispatch(self, msg):
503503
}, file=self)
504504

505505

506-
506+
507507
# Helper used by Generator._make_boundary
508508
_width = len(repr(sys.maxsize-1))
509509
_fmt = '%%0%dd' % _width

Lib/email/header.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@
5252
_embedded_header = re.compile(r'\n[^ \t]+:')
5353

5454

55-
55+
5656
# Helpers
5757
_max_append = email.quoprimime._max_append
5858

5959

60-
60+
6161
def decode_header(header):
6262
"""Decode a message header value without converting charset.
6363
@@ -152,7 +152,7 @@ def decode_header(header):
152152
return collapsed
153153

154154

155-
155+
156156
def make_header(decoded_seq, maxlinelen=None, header_name=None,
157157
continuation_ws=' '):
158158
"""Create a Header from a sequence of pairs as returned by decode_header()
@@ -175,7 +175,7 @@ def make_header(decoded_seq, maxlinelen=None, header_name=None,
175175
return h
176176

177177

178-
178+
179179
class Header:
180180
def __init__(self, s=None, charset=None,
181181
maxlinelen=None, header_name=None,
@@ -409,7 +409,7 @@ def _normalize(self):
409409
self._chunks = chunks
410410

411411

412-
412+
413413
class _ValueFormatter:
414414
def __init__(self, headerlen, maxlen, continuation_ws, splitchars):
415415
self._maxlen = maxlen

Lib/email/iterators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from io import StringIO
1616

1717

18-
18+
1919
# This function will become a method of the Message class
2020
def walk(self):
2121
"""Walk over the message tree, yielding each subpart.
@@ -29,7 +29,7 @@ def walk(self):
2929
yield from subpart.walk()
3030

3131

32-
32+
3333
# These two functions are imported into the Iterators.py interface module.
3434
def body_line_iterator(msg, decode=False):
3535
"""Iterate over the parts, returning string payloads line-by-line.
@@ -55,7 +55,7 @@ def typed_subpart_iterator(msg, maintype='text', subtype=None):
5555
yield subpart
5656

5757

58-
58+
5959
def _structure(msg, fp=None, level=0, include_default=False):
6060
"""A handy debugging aid"""
6161
if fp is None:

Lib/email/mime/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from email import message
1212

1313

14-
14+
1515
class MIMEBase(message.Message):
1616
"""Base class for MIME specializations."""
1717

Lib/email/mime/message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from email.mime.nonmultipart import MIMENonMultipart
1111

1212

13-
13+
1414
class MIMEMessage(MIMENonMultipart):
1515
"""Class representing message/* MIME documents."""
1616

Lib/email/mime/multipart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from email.mime.base import MIMEBase
1010

1111

12-
12+
1313
class MIMEMultipart(MIMEBase):
1414
"""Base class for MIME multipart/* type messages."""
1515

Lib/email/mime/nonmultipart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from email.mime.base import MIMEBase
1111

1212

13-
13+
1414
class MIMENonMultipart(MIMEBase):
1515
"""Base class for MIME non-multipart type messages."""
1616

Lib/email/mime/text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from email.mime.nonmultipart import MIMENonMultipart
1111

1212

13-
13+
1414
class MIMEText(MIMENonMultipart):
1515
"""Class for generating text/* type MIME documents."""
1616

Lib/email/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ def parsestr(self, text, headersonly=False):
6767
return self.parse(StringIO(text), headersonly=headersonly)
6868

6969

70-
70+
7171
class HeaderParser(Parser):
7272
def parse(self, fp, headersonly=True):
7373
return Parser.parse(self, fp, True)
7474

7575
def parsestr(self, text, headersonly=True):
7676
return Parser.parsestr(self, text, True)
7777

78-
78+
7979
class BytesParser:
8080

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

Lib/test/test_asyncio/test_runners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ async def coro():
441441
with asyncio.Runner() as runner:
442442
with self.assertRaises(asyncio.CancelledError):
443443
runner.run(coro())
444-
444+
445445
def test_signal_install_not_supported_ok(self):
446446
# signal.signal() can throw if the "main thread" doensn't have signals enabled
447447
assert threading.current_thread() is threading.main_thread()

Lib/test/test_isinstance.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from test import support
99

1010

11-
11+
1212
class TestIsInstanceExceptions(unittest.TestCase):
1313
# Test to make sure that an AttributeError when accessing the instance's
1414
# class's bases is masked. This was actually a bug in Python 2.2 and
@@ -97,7 +97,7 @@ def getclass(self):
9797
class D: pass
9898
self.assertRaises(RuntimeError, isinstance, c, D)
9999

100-
100+
101101
# These tests are similar to above, but tickle certain code paths in
102102
# issubclass() instead of isinstance() -- really PyObject_IsSubclass()
103103
# vs. PyObject_IsInstance().
@@ -147,7 +147,7 @@ def getbases(self):
147147
self.assertRaises(TypeError, issubclass, B, C())
148148

149149

150-
150+
151151
# meta classes for creating abstract classes and instances
152152
class AbstractClass(object):
153153
def __init__(self, bases):
@@ -179,7 +179,7 @@ class Super:
179179

180180
class Child(Super):
181181
pass
182-
182+
183183
class TestIsInstanceIsSubclass(unittest.TestCase):
184184
# Tests to ensure that isinstance and issubclass work on abstract
185185
# classes and instances. Before the 2.2 release, TypeErrors were
@@ -357,6 +357,6 @@ def blowstack(fxn, arg, compare_to):
357357
tuple_arg = (tuple_arg,)
358358
fxn(arg, tuple_arg)
359359

360-
360+
361361
if __name__ == '__main__':
362362
unittest.main()

Modules/_blake2/blake2module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838
#endif // HAVE_LIBB2
3939

4040
// for secure_zero_memory(), store32(), store48(), and store64()
41-
#include "impl/blake2-impl.h"
41+
#include "impl/blake2-impl.h"
4242

4343
#endif // Py_BLAKE2MODULE_H

Modules/_blake2/impl/blake2b-round.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
\
6363
row2l = _mm_roti_epi64(row2l, -24); \
6464
row2h = _mm_roti_epi64(row2h, -24); \
65-
65+
6666
#define G2(row1l,row2l,row3l,row4l,row1h,row2h,row3h,row4h,b0,b1) \
6767
row1l = _mm_add_epi64(_mm_add_epi64(row1l, b0), row2l); \
6868
row1h = _mm_add_epi64(_mm_add_epi64(row1h, b1), row2h); \
@@ -81,7 +81,7 @@
8181
\
8282
row2l = _mm_roti_epi64(row2l, -63); \
8383
row2h = _mm_roti_epi64(row2h, -63); \
84-
84+
8585
#if defined(HAVE_SSSE3)
8686
#define DIAGONALIZE(row1l,row2l,row3l,row4l,row1h,row2h,row3h,row4h) \
8787
t0 = _mm_alignr_epi8(row2h, row2l, 8); \

Modules/_blake2/impl/blake2s-load-xop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ buf = _mm_perm_epi8(t1, m3, _mm_set_epi32(TOB(3),TOB(2),TOB(1),TOB(7)) );
166166
#define LOAD_MSG_8_3(buf) \
167167
t0 = _mm_perm_epi8(m0, m2, _mm_set_epi32(TOB(6),TOB(1),TOB(0),TOB(0)) ); \
168168
buf = _mm_perm_epi8(t0, m3, _mm_set_epi32(TOB(3),TOB(2),TOB(5),TOB(4)) ); \
169-
169+
170170
#define LOAD_MSG_8_4(buf) \
171171
buf = _mm_perm_epi8(m0, m1, _mm_set_epi32(TOB(5),TOB(4),TOB(7),TOB(2)) );
172172

0 commit comments

Comments
 (0)