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 d65d478

Browse filesBrowse files
committed
Remove invisible pagebreak characters
1 parent 7d801f2 commit d65d478
Copy full SHA for d65d478

File tree

Expand file treeCollapse file tree

16 files changed

+4
-47
lines changed
Filter options
Expand file treeCollapse file tree

16 files changed

+4
-47
lines changed

‎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
-4Lines changed: 0 additions & 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,6 @@ def _make_boundary(cls, text=None):
392391
def _compile_re(cls, s, flags):
393392
return re.compile(s, flags)
394393

395-
396394
class BytesGenerator(Generator):
397395
"""Generates a bytes version of a Message object tree.
398396
@@ -443,7 +441,6 @@ def _compile_re(cls, s, flags):
443441
return re.compile(s.encode('ascii'), flags)
444442

445443

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

449446
class DecodedGenerator(Generator):
@@ -503,7 +500,6 @@ def _dispatch(self, msg):
503500
}, file=self)
504501

505502

506-
507503
# Helper used by Generator._make_boundary
508504
_width = len(repr(sys.maxsize-1))
509505
_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/mime/text.py

Copy file name to clipboardExpand all lines: Lib/email/mime/text.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 MIMEText(MIMENonMultipart):
1514
"""Class for generating text/* type MIME documents."""
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):

‎Modules/_io/bufferedio.c

Copy file name to clipboardExpand all lines: Modules/_io/bufferedio.c
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,6 @@ _bufferedreader_peek_unlocked(buffered *self)
17421742
self->pos = 0;
17431743
return PyBytes_FromStringAndSize(self->buffer, r);
17441744
}
1745-
17461745

17471746

17481747
/*
@@ -2052,7 +2051,6 @@ _io_BufferedWriter_write_impl(buffered *self, Py_buffer *buffer)
20522051
LEAVE_BUFFERED(self)
20532052
return res;
20542053
}
2055-
20562054

20572055

20582056
/*
@@ -2266,7 +2264,6 @@ bufferedrwpair_closed_get(rwpair *self, void *context)
22662264
}
22672265
return PyObject_GetAttr((PyObject *) self->writer, &_Py_ID(closed));
22682266
}
2269-
22702267

22712268

22722269
/*

‎Tools/i18n/pygettext.py

Copy file name to clipboardExpand all lines: Tools/i18n/pygettext.py
+3-9Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Minimally patched to make it even more xgettext compatible
66
# by Peter Funk <pf@artcom-gmbh.de>
77
#
8-
# 2002-11-22 Jürgen Hermann <jh@web.de>
8+
# 2002-11-22 J�rgen Hermann <jh@web.de>
99
# Added checks that _() only contains string literals, and
1010
# command line args are resolved to module lists, i.e. you
1111
# can now pass a filename, a module or package name, or a
@@ -174,7 +174,6 @@
174174
EMPTYSTRING = ''
175175

176176

177-
178177
# The normal pot-file header. msgmerge and Emacs's po-mode work better if it's
179178
# there.
180179
pot_header = _('''\
@@ -196,20 +195,18 @@
196195
197196
''')
198197

199-
200198
def usage(code, msg=''):
201199
print(__doc__ % globals(), file=sys.stderr)
202200
if msg:
203201
print(msg, file=sys.stderr)
204202
sys.exit(code)
205203

206204

207-
208205
def make_escapes(pass_nonascii):
209206
global escapes, escape
210207
if pass_nonascii:
211208
# Allow non-ascii characters to pass through so that e.g. 'msgid
212-
# "Höhe"' would result not result in 'msgid "H\366he"'. Otherwise we
209+
# "H�he"' would result not result in 'msgid "H\366he"'. Otherwise we
213210
# escape any character outside the 32..126 range.
214211
mod = 128
215212
escape = escape_ascii
@@ -258,7 +255,7 @@ def normalize(s, encoding):
258255
s = '""\n"' + lineterm.join(lines) + '"'
259256
return s
260257

261-
258+
262259
def containsAny(str, set):
263260
"""Check whether 'str' contains ANY of the chars in 'set'"""
264261
return 1 in [c in str for c in set]
@@ -307,7 +304,6 @@ def getFilesForName(name):
307304

308305
return []
309306

310-
311307
class TokenEater:
312308
def __init__(self, options):
313309
self.__options = options
@@ -515,7 +511,6 @@ def write(self, fp):
515511
print('msgstr ""\n', file=fp)
516512

517513

518-
519514
def main():
520515
global default_keywords
521516
try:
@@ -675,7 +670,6 @@ class Options:
675670
if closep:
676671
fp.close()
677672

678-
679673
if __name__ == '__main__':
680674
main()
681675
# some more test strings

0 commit comments

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