Skip to content

Commit 1b316b7

Browse files
author
tim_one
committed
Whitespace normalization.
git-svn-id: http://svn.python.org/projects/python/trunk@32741 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 9dee1be commit 1b316b7

7 files changed

Lines changed: 24 additions & 25 deletions

File tree

Lib/httplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ def getresponse(self):
768768

769769
if self.debuglevel > 0:
770770
response = self.response_class(self.sock, self.debuglevel,
771-
strict=self.strict,
771+
strict=self.strict,
772772
method=self._method)
773773
else:
774774
response = self.response_class(self.sock, strict=self.strict,

Lib/test/test_bool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,4 +325,3 @@ def test_main():
325325

326326
if __name__ == "__main__":
327327
test_main()
328-

Lib/test/test_socket.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def testIPv4toString(self):
332332
self.assertEquals('\x00\x00\x00\x00', g('0.0.0.0'))
333333
self.assertEquals('\xff\x00\xff\x00', g('255.0.255.0'))
334334
self.assertEquals('\xaa\xaa\xaa\xaa', g('170.170.170.170'))
335-
335+
336336
def testIPv6toString(self):
337337
if not hasattr(socket, 'inet_pton'):
338338
return # No inet_pton() on this platform
@@ -351,7 +351,7 @@ def testIPv6toString(self):
351351
'\x45\xef\x76\xcb\x00\x1a\x56\xef\xaf\xeb\x0b\xac\x19\x24\xae\xae',
352352
f('45ef:76cb:1a:56ef:afeb:bac:1924:aeae')
353353
)
354-
354+
355355
def testStringToIPv4(self):
356356
if not hasattr(socket, 'inet_ntop'):
357357
return # No inet_ntop() on this platform
@@ -362,7 +362,7 @@ def testStringToIPv4(self):
362362
self.assertEquals('170.85.170.85', f('\xaa\x55\xaa\x55'))
363363
self.assertEquals('255.255.255.255', f('\xff\xff\xff\xff'))
364364
self.assertEquals('1.2.3.4', f('\x01\x02\x03\x04'))
365-
365+
366366
self.assertEquals('1.0.1.0', g('\x01\x00\x01\x00'))
367367
self.assertEquals('170.85.170.85', g('\xaa\x55\xaa\x55'))
368368
self.assertEquals('255.255.255.255', g('\xff\xff\xff\xff'))

Lib/test/test_types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ def f():
258258

259259
# Verify that __getitem__ overrides are not recognized by __iter__
260260
class T(tuple):
261-
def __getitem__(self, key):
262-
return str(key) + '!!!'
261+
def __getitem__(self, key):
262+
return str(key) + '!!!'
263263
vereq(iter(T((1,2))).next(), 1)
264264

265265
print '6.5.3 Lists'
@@ -455,8 +455,8 @@ def selfmodifyingComparison(x,y):
455455

456456
# Verify that __getitem__ overrides are not recognized by __iter__
457457
class L(list):
458-
def __getitem__(self, key):
459-
return str(key) + '!!!'
458+
def __getitem__(self, key):
459+
return str(key) + '!!!'
460460
vereq(iter(L([1,2])).next(), 1)
461461

462462

Lib/test/test_urllib.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ def hooktester(count, block_size, total_size, count_holder=[0]):
139139

140140
class QuotingTests(unittest.TestCase):
141141
"""Tests for urllib.quote() and urllib.quote_plus()
142-
142+
143143
According to RFC 2396 ("Uniform Resource Identifiers), to escape a
144144
character you write it as '%' + <2 character US-ASCII hex value>. The Python
145145
code of ``'%' + hex(ord(<character>))[2:]`` escapes a character properly.
146146
Case does not matter on the hex letters.
147147
148148
The various character sets specified are:
149-
149+
150150
Reserved characters : ";/?:@&=+$,"
151151
Have special meaning in URIs and must be escaped if not being used for
152152
their special meaning
@@ -160,7 +160,7 @@ class QuotingTests(unittest.TestCase):
160160
Must be escaped
161161
Unwise : "{}|\^[]`"
162162
Must be escaped
163-
163+
164164
"""
165165

166166
def test_never_quote(self):
@@ -206,7 +206,7 @@ def test_default_quoting(self):
206206
result = urllib.quote_plus(char)
207207
self.assertEqual(hexescape(char), result,
208208
"using quote_plus(): "
209-
"%s should be escapes to %s, not %s" %
209+
"%s should be escapes to %s, not %s" %
210210
(char, hexescape(char), result))
211211
del should_quote
212212
partial_quote = "ab[]cd"
@@ -238,7 +238,7 @@ def test_quoting_space(self):
238238

239239
class UnquotingTests(unittest.TestCase):
240240
"""Tests for unquote() and unquote_plus()
241-
241+
242242
See the doc string for quoting_Tests for details on quoting and such.
243243
244244
"""
@@ -279,7 +279,7 @@ def test_unquoting_parts(self):
279279
result = urllib.unquote_plus(given)
280280
self.assertEqual(expect, result,
281281
"using unquote_plus(): %s != %s" % (expect, result))
282-
282+
283283
def test_unquoting_plus(self):
284284
# Test difference between unquote() and unquote_plus()
285285
given = "are+there+spaces..."
@@ -297,15 +297,15 @@ class urlencode_Tests(unittest.TestCase):
297297

298298
def help_inputtype(self, given, test_type):
299299
"""Helper method for testing different input types.
300-
300+
301301
'given' must lead to only the pairs:
302302
* 1st, 1
303303
* 2nd, 2
304304
* 3rd, 3
305-
305+
306306
Test cannot assume anything about order. Docs make no guarantee and
307307
have possible dictionary input.
308-
308+
309309
"""
310310
expect_somewhere = ["1st=1", "2nd=2", "3rd=3"]
311311
result = urllib.urlencode(given)
@@ -404,7 +404,7 @@ def test_quoting(self):
404404
self.assertEqual(expect, result,
405405
"url2pathname() failed; %s != %s" %
406406
(expect, result))
407-
407+
408408

409409

410410
def test_main():

Lib/textwrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def dedent(text):
318318
319319
This can be used e.g. to make triple-quoted strings line up with
320320
the left edge of screen/whatever, while still presenting it in the
321-
source code in indented form.
321+
source code in indented form.
322322
323323
For example:
324324

Lib/xmlrpclib.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def __init__(self, encoding=None, allow_none=0):
571571
self.data = None
572572
self.encoding = encoding
573573
self.allow_none = allow_none
574-
574+
575575
dispatch = {}
576576

577577
def dumps(self, values):
@@ -612,7 +612,7 @@ def dump_nil (self, value, write):
612612
raise TypeError, "cannot marshal None unless allow_none is enabled"
613613
write("<value><nil/></value>")
614614
dispatch[NoneType] = dump_nil
615-
615+
616616
def dump_int(self, value, write):
617617
# in case ints are > 32 bits
618618
if value > MAXINT or value < MININT:
@@ -784,7 +784,7 @@ def end_nil (self, data):
784784
self.append(None)
785785
self._value = 0
786786
dispatch["nil"] = end_nil
787-
787+
788788
def end_boolean(self, data):
789789
if data == "0":
790790
self.append(False)
@@ -1294,7 +1294,7 @@ def __init__(self, uri, transport=None, encoding=None, verbose=0,
12941294
self.__encoding = encoding
12951295
self.__verbose = verbose
12961296
self.__allow_none = allow_none
1297-
1297+
12981298
def __request(self, methodname, params):
12991299
# call a method on the remote server
13001300

@@ -1340,7 +1340,7 @@ def __getattr__(self, name):
13401340
# simple test program (from the XML-RPC specification)
13411341

13421342
# server = ServerProxy("http://localhost:8000") # local server
1343-
server = ServerProxy("http://betty.userland.com")
1343+
server = ServerProxy("http://betty.userland.com")
13441344

13451345
print server
13461346

0 commit comments

Comments
 (0)