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

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

0 commit comments

Comments
 (0)