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

Skip to content

Commit f2715e0

Browse files
committed
Whitespace normalization.
1 parent f805cd2 commit f2715e0

26 files changed

Lines changed: 110 additions & 114 deletions

Lib/cmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ class Cmd:
7979
def __init__(self, completekey='tab', stdin=None, stdout=None):
8080
"""Instantiate a line-oriented interpreter framework.
8181
82-
The optional argument 'completekey' is the readline name of a
83-
completion key; it defaults to the Tab key. If completekey is
84-
not None and the readline module is available, command completion
82+
The optional argument 'completekey' is the readline name of a
83+
completion key; it defaults to the Tab key. If completekey is
84+
not None and the readline module is available, command completion
8585
is done automatically. The optional arguments stdin and stdout
8686
specify alternate input and output file objects; if not specified,
8787
sys.stdin and sys.stdout are used.

Lib/copy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def copy(x):
9393
raise Error("un(shallow)copyable object of type %s" % cls)
9494

9595
return _reconstruct(x, rv, 0)
96-
96+
9797

9898
_copy_dispatch = d = {}
9999

Lib/os.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def _get_exports_list(module):
4444
except ImportError:
4545
pass
4646
import posixpath as path
47-
47+
4848
import posix
4949
__all__.extend(_get_exports_list(posix))
5050
del posix
@@ -58,7 +58,7 @@ def _get_exports_list(module):
5858
except ImportError:
5959
pass
6060
import ntpath as path
61-
61+
6262
import nt
6363
__all__.extend(_get_exports_list(nt))
6464
del nt
@@ -75,7 +75,7 @@ def _get_exports_list(module):
7575
import ntpath as path
7676
else:
7777
import os2emxpath as path
78-
78+
7979
import os2
8080
__all__.extend(_get_exports_list(os2))
8181
del os2
@@ -89,7 +89,7 @@ def _get_exports_list(module):
8989
except ImportError:
9090
pass
9191
import macpath as path
92-
92+
9393
import mac
9494
__all__.extend(_get_exports_list(mac))
9595
del mac
@@ -104,7 +104,7 @@ def _get_exports_list(module):
104104
pass
105105
# We can use the standard Windows path.
106106
import ntpath as path
107-
107+
108108
import ce
109109
__all__.extend(_get_exports_list(ce))
110110
del ce
@@ -118,7 +118,7 @@ def _get_exports_list(module):
118118
except ImportError:
119119
pass
120120
import riscospath as path
121-
121+
122122
import riscos
123123
__all__.extend(_get_exports_list(riscos))
124124
del riscos

Lib/test/re_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@
553553
# escaping with \ as we know it
554554
('(?<!\\\):(.*?)(?<!\\\):', 'a:bc\\:de:f', SUCCEED, 'g1', 'bc\\:de' ),
555555
# terminating with ' and escaping with ? as in edifact
556-
("(?<!\\?)'(.*?)(?<!\\?)'", "a'bc?'de'f", SUCCEED, 'g1', "bc?'de" ),
556+
("(?<!\\?)'(.*?)(?<!\\?)'", "a'bc?'de'f", SUCCEED, 'g1', "bc?'de" ),
557557

558558
# Comments using the (?#...) syntax
559559

Lib/test/regrtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ def __init__(self):
933933
if sys.platform != "win32":
934934
self.expected.add("test_winreg")
935935
self.expected.add("test_winsound")
936-
936+
937937
self.valid = True
938938

939939
def isvalid(self):

Lib/test/test_aepack.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_roundtrip_aeobjects(self):
5353
packed = aepack.pack(o)
5454
unpacked = aepack.unpack(packed)
5555
self.assertEqual(repr(o), repr(unpacked))
56-
56+
5757
def test_roundtrip_FSSpec(self):
5858
try:
5959
import Carbon.File
@@ -72,9 +72,9 @@ def test_roundtrip_Alias(self):
7272
o = Carbon.File.FSSpec(os.curdir).NewAliasMinimal()
7373
packed = aepack.pack(o)
7474
unpacked = aepack.unpack(packed)
75-
self.assertEqual(o.FSResolveAlias(None)[0].as_pathname(),
75+
self.assertEqual(o.FSResolveAlias(None)[0].as_pathname(),
7676
unpacked.FSResolveAlias(None)[0].as_pathname())
77-
77+
7878

7979
def test_main():
8080
test_support.run_unittest(TestAepack)

Lib/test/test_bisect.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,3 @@ def test_main(verbose=None):
214214

215215
if __name__ == "__main__":
216216
test_main(verbose=True)
217-

Lib/test/test_builtin.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ def identity(item):
352352
filter(identity, Squares(5))
353353
self.assertRaises(TypeError, filter)
354354
class BadSeq(object):
355-
def __getitem__(self, index):
356-
if index<4:
357-
return 42
358-
raise ValueError
355+
def __getitem__(self, index):
356+
if index<4:
357+
return 42
358+
raise ValueError
359359
self.assertRaises(ValueError, filter, lambda x: x, BadSeq())
360360
def badfunc():
361361
pass
@@ -441,13 +441,13 @@ def __getitem__(self, index):
441441

442442
for (cls, inps) in inputs.iteritems():
443443
for (inp, exp) in inps.iteritems():
444-
# make sure the output goes through __getitem__
445-
# even if func is None
446-
self.assertEqual(
447-
filter(funcs[0], cls(inp)),
448-
filter(funcs[1], cls(inp))
449-
)
450-
for func in funcs:
444+
# make sure the output goes through __getitem__
445+
# even if func is None
446+
self.assertEqual(
447+
filter(funcs[0], cls(inp)),
448+
filter(funcs[1], cls(inp))
449+
)
450+
for func in funcs:
451451
outp = filter(func, cls(inp))
452452
self.assertEqual(outp, exp)
453453
self.assert_(not isinstance(outp, cls))
@@ -1039,10 +1039,10 @@ def test_round(self):
10391039
self.assertRaises(TypeError, round)
10401040

10411041
def test_setattr(self):
1042-
setattr(sys, 'spam', 1)
1043-
self.assertEqual(sys.spam, 1)
1044-
self.assertRaises(TypeError, setattr, sys, 1, 'spam')
1045-
self.assertRaises(TypeError, setattr)
1042+
setattr(sys, 'spam', 1)
1043+
self.assertEqual(sys.spam, 1)
1044+
self.assertRaises(TypeError, setattr, sys, 1, 'spam')
1045+
self.assertRaises(TypeError, setattr)
10461046

10471047
def test_str(self):
10481048
self.assertEqual(str(''), '')

Lib/test/test_codeccallbacks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def handle(self, exc):
1111
oldpos = self.pos
1212
realpos = oldpos
1313
if realpos<0:
14-
realpos = len(exc.object) + realpos
14+
realpos = len(exc.object) + realpos
1515
# if we don't advance this time, terminate on the next call
1616
# otherwise we'd get an endless loop
1717
if realpos <= exc.start:
@@ -532,7 +532,7 @@ def test_xmlcharrefvalues(self):
532532
# and inline implementations
533533
v = (1, 5, 10, 50, 100, 500, 1000, 5000, 10000, 50000)
534534
if sys.maxunicode>=100000:
535-
v += (100000, 500000, 1000000)
535+
v += (100000, 500000, 1000000)
536536
s = u"".join([unichr(x) for x in v])
537537
codecs.register_error("test.xmlcharrefreplace", codecs.xmlcharrefreplace_errors)
538538
for enc in ("ascii", "iso-8859-15"):

Lib/test/test_datetime.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ def test_pickling_base(self):
103103
orig = tzinfo.__new__(tzinfo)
104104
self.failUnless(type(orig) is tzinfo)
105105
for pickler, unpickler, proto in pickle_choices:
106-
green = pickler.dumps(orig, proto)
107-
derived = unpickler.loads(green)
108-
self.failUnless(type(derived) is tzinfo)
106+
green = pickler.dumps(orig, proto)
107+
derived = unpickler.loads(green)
108+
self.failUnless(type(derived) is tzinfo)
109109

110110
def test_pickling_subclass(self):
111111
# Make sure we can pickle/unpickle an instance of a subclass.
@@ -116,12 +116,12 @@ def test_pickling_subclass(self):
116116
self.assertEqual(orig.utcoffset(None), offset)
117117
self.assertEqual(orig.tzname(None), 'cookie')
118118
for pickler, unpickler, proto in pickle_choices:
119-
green = pickler.dumps(orig, proto)
120-
derived = unpickler.loads(green)
121-
self.failUnless(isinstance(derived, tzinfo))
122-
self.failUnless(type(derived) is PicklableFixedOffset)
123-
self.assertEqual(derived.utcoffset(None), offset)
124-
self.assertEqual(derived.tzname(None), 'cookie')
119+
green = pickler.dumps(orig, proto)
120+
derived = unpickler.loads(green)
121+
self.failUnless(isinstance(derived, tzinfo))
122+
self.failUnless(type(derived) is PicklableFixedOffset)
123+
self.assertEqual(derived.utcoffset(None), offset)
124+
self.assertEqual(derived.tzname(None), 'cookie')
125125

126126
#############################################################################
127127
# Base clase for testing a particular aspect of timedelta, time, date and
@@ -517,8 +517,8 @@ def test_ordinal_conversions(self):
517517
fromord = self.theclass.fromordinal(n)
518518
self.assertEqual(d, fromord)
519519
if hasattr(fromord, "hour"):
520-
# if we're checking something fancier than a date, verify
521-
# the extra fields have been zeroed out
520+
# if we're checking something fancier than a date, verify
521+
# the extra fields have been zeroed out
522522
self.assertEqual(fromord.hour, 0)
523523
self.assertEqual(fromord.minute, 0)
524524
self.assertEqual(fromord.second, 0)

0 commit comments

Comments
 (0)