Skip to content

Commit b64bec3

Browse files
committed
Whitespace normalization.
1 parent a86f0c1 commit b64bec3

8 files changed

Lines changed: 18 additions & 21 deletions

File tree

‎Lib/HTMLParser.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def parse_doctype_attlist(self, i, declstartpos):
439439
if c == '>':
440440
# all done
441441
return j + 1
442-
442+
443443
def parse_doctype_notation(self, i, declstartpos):
444444
name, j = self.scan_name(i, declstartpos)
445445
if j < 0:

‎Lib/hmac.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ def _strxor(s1, s2):
99
"""Utility method. XOR the two strings s1 and s2 (must have same length).
1010
"""
1111
return "".join(map(lambda x, y: chr(ord(x) ^ ord(y)), s1, s2))
12-
12+
1313
class HMAC:
1414
"""RFC2104 HMAC class.
1515
1616
This (mostly) supports the API for Cryptographic Hash Functions (PEP 247).
17-
"""
17+
"""
1818

1919
def __init__(self, key, msg = None, digestmod = None):
2020
"""Create a new HMAC object.
@@ -80,7 +80,7 @@ def new(key, msg = None, digestmod = None):
8080
8181
key: The starting key for the hash.
8282
msg: if available, will immediately be hashed into the object's starting
83-
state.
83+
state.
8484
8585
You can now feed arbitrary strings into the object using its update()
8686
method, and can ask for the hash value at any time by calling its digest()

‎Lib/posixpath.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,5 +398,5 @@ def realpath(filename):
398398
resolved = normpath(join(dir, resolved))
399399
newpath = join(*([resolved] + bits[i:]))
400400
return realpath(newpath)
401-
401+
402402
return filename

‎Lib/smtplib.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class SMTPAuthenticationError(SMTPResponseException):
126126

127127
class SSLFakeSocket:
128128
"""A fake socket object that really wraps a SSLObject.
129-
129+
130130
It only supports what is needed in smtplib.
131131
"""
132132
def __init__(self, realsock, sslobj):
@@ -142,7 +142,7 @@ def close(self):
142142

143143
class SSLFakeFile:
144144
"""A fake file like object that really wraps a SSLObject.
145-
145+
146146
It only supports what is needed in smtplib.
147147
"""
148148
def __init__( self, sslobj):
@@ -524,15 +524,15 @@ def encode_plain(user, password):
524524
authmethod = method
525525
break
526526
if self.debuglevel > 0: print "AuthMethod:", authmethod
527-
527+
528528
if authmethod == AUTH_CRAM_MD5:
529529
(code, resp) = self.docmd("AUTH", AUTH_CRAM_MD5)
530530
if code == 503:
531531
# 503 == 'Error: already authenticated'
532532
return (code, resp)
533533
(code, resp) = self.docmd(encode_cram_md5(resp, user, password))
534534
elif authmethod == AUTH_PLAIN:
535-
(code, resp) = self.docmd("AUTH",
535+
(code, resp) = self.docmd("AUTH",
536536
AUTH_PLAIN + " " + encode_plain(user, password))
537537
elif authmethod == None:
538538
raise SMTPError("No suitable authentication method found.")
@@ -544,20 +544,20 @@ def encode_plain(user, password):
544544

545545
def starttls(self, keyfile = None, certfile = None):
546546
"""Puts the connection to the SMTP server into TLS mode.
547-
547+
548548
If the server supports TLS, this will encrypt the rest of the SMTP
549549
session. If you provide the keyfile and certfile parameters,
550550
the identity of the SMTP server and client can be checked. This,
551551
however, depends on whether the socket module really checks the
552552
certificates.
553553
"""
554-
(resp, reply) = self.docmd("STARTTLS")
554+
(resp, reply) = self.docmd("STARTTLS")
555555
if resp == 220:
556556
sslobj = socket.ssl(self.sock, keyfile, certfile)
557557
self.sock = SSLFakeSocket(self.sock, sslobj)
558558
self.file = SSLFakeFile(sslobj)
559559
return (resp, reply)
560-
560+
561561
def sendmail(self, from_addr, to_addrs, msg, mail_options=[],
562562
rcpt_options=[]):
563563
"""This command performs an entire mail transaction.

‎Lib/test/test_doctest.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import doctest, test_support
1+
import doctest, test_support
22
test_support.run_doctest(doctest)

‎Lib/test/test_getargs.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,3 @@
1919
marshal.loads(u"\222")
2020
except UnicodeError:
2121
pass
22-
23-
24-

‎Lib/threading.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,24 +489,24 @@ def Timer(*args, **kwargs):
489489

490490
class _Timer(Thread):
491491
"""Call a function after a specified number of seconds:
492-
492+
493493
t = Timer(30.0, f, args=[], kwargs={})
494494
t.start()
495495
t.cancel() # stop the timer's action if it's still waiting
496496
"""
497-
497+
498498
def __init__(self, interval, function, args=[], kwargs={}):
499499
Thread.__init__(self)
500500
self.interval = interval
501501
self.function = function
502502
self.args = args
503503
self.kwargs = kwargs
504504
self.finished = Event()
505-
505+
506506
def cancel(self):
507507
"""Stop the timer if it hasn't finished yet"""
508508
self.finished.set()
509-
509+
510510
def run(self):
511511
self.finished.wait(self.interval)
512512
if not self.finished.isSet():

‎Lib/zipfile.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def write(self, filename, arcname=None, compress_type=None):
417417
zinfo.CRC = CRC
418418
zinfo.file_size = file_size
419419
# Seek backwards and write CRC and file sizes
420-
position = self.fp.tell() # Preserve current position in file
420+
position = self.fp.tell() # Preserve current position in file
421421
self.fp.seek(zinfo.header_offset + 14, 0)
422422
self.fp.write(struct.pack("<lll", zinfo.CRC, zinfo.compress_size,
423423
zinfo.file_size))

0 commit comments

Comments
 (0)