Skip to content

Commit 230a60c

Browse files
committed
Whitespace normalization.
1 parent b0ead4e commit 230a60c

7 files changed

Lines changed: 27 additions & 28 deletions

File tree

Lib/ConfigParser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def items(self, section, raw=0, vars=None):
525525
def _interpolate(self, section, option, rawval, vars):
526526
# do the string interpolation
527527
value = rawval
528-
depth = MAX_INTERPOLATION_DEPTH
528+
depth = MAX_INTERPOLATION_DEPTH
529529
while depth: # Loop through this until it's done
530530
depth -= 1
531531
if value.find("%(") != -1:

Lib/httplib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def read(self, amt=None):
371371

372372
if self.chunked:
373373
return self._read_chunked(amt)
374-
374+
375375
if amt is None:
376376
# unbounded read
377377
if self.will_close:
@@ -441,7 +441,7 @@ def _read_chunked(self, amt):
441441
self.close()
442442

443443
return value
444-
444+
445445
def _safe_read(self, amt):
446446
"""Read the number of bytes requested, compensating for partial reads.
447447

Lib/locale.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def _parse_localename(localename):
272272
# since some systems may use other encodings for these
273273
# locales. Also, we ignore other modifiers.
274274
return code, 'iso-8859-15'
275-
275+
276276
if '.' in code:
277277
return code.split('.')[:2]
278278
elif code == 'C':
@@ -420,7 +420,7 @@ def getpreferredencoding(do_setlocale = True):
420420
return result
421421
else:
422422
return nl_langinfo(CODESET)
423-
423+
424424

425425
### Database
426426
#

Lib/posixpath.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,4 +411,3 @@ def realpath(filename):
411411
return filename
412412

413413
supports_unicode_filenames = False
414-

Lib/site.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def makepath(*paths):
9494
# (especially for Guido :-)
9595
# XXX This should not be part of site.py, since it is needed even when
9696
# using the -S option for Python. See http://www.python.org/sf/586680
97-
if (os.name == "posix" and sys.path and
97+
if (os.name == "posix" and sys.path and
9898
os.path.basename(sys.path[-1]) == "Modules"):
9999
from distutils.util import get_platform
100100
s = "build/lib.%s-%.3s" % (get_platform(), sys.version)

Lib/telnetlib.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,12 +399,12 @@ def read_very_lazy(self):
399399
if not buf and self.eof and not self.rawq:
400400
raise EOFError, 'telnet connection closed'
401401
return buf
402-
402+
403403
def read_sb_data(self):
404404
"""Return any data available in the SB ... SE queue.
405405
406-
Return '' if no SB ... SE available. Should only be called
407-
after seeing a SB or SE command. When a new SB command is
406+
Return '' if no SB ... SE available. Should only be called
407+
after seeing a SB or SE command. When a new SB command is
408408
found, old unread SB data will be discarded. Don't block.
409409
410410
"""
@@ -442,7 +442,7 @@ def process_rawq(self):
442442
if c in (DO, DONT, WILL, WONT):
443443
self.iacseq += c
444444
continue
445-
445+
446446
self.iacseq = ''
447447
if c == IAC:
448448
buf[self.sb] = buf[self.sb] + c
@@ -468,7 +468,7 @@ def process_rawq(self):
468468
self.iacseq = ''
469469
opt = c
470470
if cmd in (DO, DONT):
471-
self.msg('IAC %s %d',
471+
self.msg('IAC %s %d',
472472
cmd == DO and 'DO' or 'DONT', ord(opt))
473473
if self.option_callback:
474474
self.option_callback(self.sock, cmd, opt)

Lib/test/test_bz2.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ class BZ2FileTest(BaseTest):
2828

2929
def setUp(self):
3030
self.filename = tempfile.mktemp("bz2")
31-
31+
3232
def tearDown(self):
3333
if os.path.isfile(self.filename):
3434
os.unlink(self.filename)
35-
35+
3636
def createTempFile(self, crlf=0):
3737
f = open(self.filename, "wb")
3838
if crlf:
@@ -41,14 +41,14 @@ def createTempFile(self, crlf=0):
4141
data = self.DATA
4242
f.write(data)
4343
f.close()
44-
44+
4545
def testRead(self):
4646
"Test BZ2File.read()"
4747
self.createTempFile()
4848
bz2f = BZ2File(self.filename)
4949
self.assertEqual(bz2f.read(), self.TEXT)
5050
bz2f.close()
51-
51+
5252
def testReadChunk10(self):
5353
"Test BZ2File.read() in chunks of 10 bytes"
5454
self.createTempFile()
@@ -61,14 +61,14 @@ def testReadChunk10(self):
6161
text += str
6262
self.assertEqual(text, text)
6363
bz2f.close()
64-
64+
6565
def testRead100(self):
6666
"Test BZ2File.read(100)"
6767
self.createTempFile()
6868
bz2f = BZ2File(self.filename)
6969
self.assertEqual(bz2f.read(100), self.TEXT[:100])
7070
bz2f.close()
71-
71+
7272
def testReadLine(self):
7373
"Test BZ2File.readline()"
7474
self.createTempFile()
@@ -77,47 +77,47 @@ def testReadLine(self):
7777
for line in sio.readlines():
7878
self.assertEqual(bz2f.readline(), line)
7979
bz2f.close()
80-
80+
8181
def testReadLines(self):
8282
"Test BZ2File.readlines()"
8383
self.createTempFile()
8484
bz2f = BZ2File(self.filename)
8585
sio = StringIO(self.TEXT)
8686
self.assertEqual(bz2f.readlines(), sio.readlines())
8787
bz2f.close()
88-
88+
8989
def testIterator(self):
9090
"Test iter(BZ2File)"
9191
self.createTempFile()
9292
bz2f = BZ2File(self.filename)
9393
sio = StringIO(self.TEXT)
9494
self.assertEqual(list(iter(bz2f)), sio.readlines())
9595
bz2f.close()
96-
96+
9797
def testXReadLines(self):
9898
"Test BZ2File.xreadlines()"
9999
self.createTempFile()
100100
bz2f = BZ2File(self.filename)
101101
sio = StringIO(self.TEXT)
102102
self.assertEqual(list(bz2f.xreadlines()), sio.readlines())
103103
bz2f.close()
104-
104+
105105
def testUniversalNewlinesLF(self):
106106
"Test BZ2File.read() with universal newlines (\\n)"
107107
self.createTempFile()
108108
bz2f = BZ2File(self.filename, "rU")
109109
self.assertEqual(bz2f.read(), self.TEXT)
110110
self.assertEqual(bz2f.newlines, "\n")
111111
bz2f.close()
112-
112+
113113
def testUniversalNewlinesCRLF(self):
114114
"Test BZ2File.read() with universal newlines (\\r\\n)"
115115
self.createTempFile(crlf=1)
116116
bz2f = BZ2File(self.filename, "rU")
117117
self.assertEqual(bz2f.read(), self.TEXT)
118118
self.assertEqual(bz2f.newlines, "\r\n")
119119
bz2f.close()
120-
120+
121121
def testWrite(self):
122122
"Test BZ2File.write()"
123123
bz2f = BZ2File(self.filename, "w")
@@ -151,7 +151,7 @@ def testWriteLines(self):
151151
f = open(self.filename)
152152
self.assertEqual(self.decompress(f.read()), self.TEXT)
153153
f.close()
154-
154+
155155
def testSeekForward(self):
156156
"Test BZ2File.seek(150, 0)"
157157
self.createTempFile()
@@ -173,7 +173,7 @@ def testSeekBackwardsFromEnd(self):
173173
bz2f = BZ2File(self.filename)
174174
bz2f.seek(-150, 2)
175175
self.assertEqual(bz2f.read(), self.TEXT[len(self.TEXT)-150:])
176-
176+
177177
def testSeekPostEnd(self):
178178
"Test BZ2File.seek(150000)"
179179
self.createTempFile()
@@ -258,7 +258,7 @@ def testEOFError(self):
258258

259259
class FuncTest(BaseTest):
260260
"Test module functions"
261-
261+
262262
def testCompress(self):
263263
"Test compress() function"
264264
data = compress(self.TEXT)
@@ -268,7 +268,7 @@ def testDecompress(self):
268268
"Test decompress() function"
269269
text = decompress(self.DATA)
270270
self.assertEqual(text, self.TEXT)
271-
271+
272272
def testDecompressEmpty(self):
273273
"Test decompress() function with empty string"
274274
text = decompress("")

0 commit comments

Comments
 (0)