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

Skip to content

Commit 5a9fb3c

Browse files
committed
Whitespace normalization.
1 parent e4f5600 commit 5a9fb3c

9 files changed

Lines changed: 44 additions & 47 deletions

File tree

Lib/plat-mac/bundlebuilder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class BundleBuilder(Defaults):
110110

111111
# Verbosity level.
112112
verbosity = 1
113-
113+
114114
# Destination root directory
115115
destroot = ""
116116

Lib/plat-mac/pimp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -907,26 +907,26 @@ def unpackPackageOnly(self, output=None):
907907

908908
def installPackageOnly(self, output=None):
909909
"""Install a single source package.
910-
910+
911911
If output is given it should be a file-like object and it
912912
will receive a log of what happened."""
913-
913+
914914
if self._dict.has_key('Post-install-command'):
915915
return "%s: Installer package cannot have Post-install-command" % self.fullname()
916916

917917
if self._dict.has_key('Pre-install-command'):
918918
if _cmd(output, '/tmp', self._dict['Pre-install-command']):
919919
return "pre-install %s: running \"%s\" failed" % \
920920
(self.fullname(), self._dict['Pre-install-command'])
921-
921+
922922
self.beforeInstall()
923923

924924
installcmd = self._dict.get('Install-command')
925925
if installcmd:
926926
if '%' in installcmd:
927927
installcmd = installcmd % self.archiveFilename
928928
else:
929-
installcmd = 'open \"%s\"' % self.archiveFilename
929+
installcmd = 'open \"%s\"' % self.archiveFilename
930930
if _cmd(output, "/tmp", installcmd):
931931
return '%s: install command failed (use verbose for details)' % self.fullname()
932932
return '%s: downloaded and opened. Install manually and restart Package Manager' % self.archiveFilename

Lib/test/inspect_fodder2.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# line 1
22
def wrap(foo=None):
3-
def wrapper(func):
4-
return func
5-
return wrapper
3+
def wrapper(func):
4+
return func
5+
return wrapper
66

77
# line 7
88
def replace(func):
9-
def insteadfunc():
10-
print 'hello'
11-
return insteadfunc
9+
def insteadfunc():
10+
print 'hello'
11+
return insteadfunc
1212

1313
# line 13
1414
@wrap()
1515
@wrap(wrap)
1616
def wrapped():
17-
pass
17+
pass
1818

1919
# line 19
2020
@replace
2121
def gone():
22-
pass
22+
pass
2323

2424
# line 24
2525
oll = lambda m: m

Lib/test/test_csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _test_arg_valid(self, ctor, arg):
3333
self.assertRaises(TypeError, ctor, arg, quoting=None)
3434
# We now allow this, only raising an exception if quoting is needed.
3535
# self.assertRaises(TypeError, ctor, arg, quotechar=None)
36-
# self.assertRaises(TypeError, ctor, arg,
36+
# self.assertRaises(TypeError, ctor, arg,
3737
# quoting=csv.QUOTE_NONE, escapechar=None)
3838
# No longer complains about dialects with invalid attributes [AM]
3939
# class BadDialect:

Lib/test/test_inspect.py

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class IsTestBase(unittest.TestCase):
3131
predicates = set([inspect.isbuiltin, inspect.isclass, inspect.iscode,
3232
inspect.isframe, inspect.isfunction, inspect.ismethod,
3333
inspect.ismodule, inspect.istraceback])
34-
34+
3535
def istest(self, predicate, exp):
3636
obj = eval(exp)
3737
self.failUnless(predicate(obj), '%s(%s)' % (predicate.__name__, exp))
38-
38+
3939
for other in self.predicates - set([predicate]):
4040
self.failIf(other(obj), 'not %s(%s)' % (other.__name__, exp))
4141

@@ -44,7 +44,7 @@ def test_eleven(self):
4444
# Doc/lib/libinspect.tex claims there are 11 such functions
4545
count = len(filter(lambda x:x.startswith('is'), dir(inspect)))
4646
self.assertEqual(count, 11, "There are %d (not 11) is* functions" % count)
47-
47+
4848
def test_excluding_predicates(self):
4949
self.istest(inspect.isbuiltin, 'sys.exit')
5050
self.istest(inspect.isbuiltin, '[].append')
@@ -66,7 +66,7 @@ def test_isroutine(self):
6666
class TestInterpreterStack(IsTestBase):
6767
def __init__(self, *args, **kwargs):
6868
unittest.TestCase.__init__(self, *args, **kwargs)
69-
69+
7070
git.abuse(7, 8, 9)
7171

7272
def test_abuse_done(self):
@@ -76,7 +76,7 @@ def test_abuse_done(self):
7676
def test_stack(self):
7777
self.assert_(len(mod.st) >= 5)
7878
self.assertEqual(mod.st[0][1:],
79-
(modfile, 16, 'eggs', [' st = inspect.stack()\n'], 0))
79+
(modfile, 16, 'eggs', [' st = inspect.stack()\n'], 0))
8080
self.assertEqual(mod.st[1][1:],
8181
(modfile, 9, 'spam', [' eggs(b + d, c + f)\n'], 0))
8282
self.assertEqual(mod.st[2][1:],
@@ -113,7 +113,7 @@ def test_previous_frame(self):
113113
class GetSourceBase(unittest.TestCase):
114114
# Subclasses must override.
115115
fodderFile = None
116-
116+
117117
def __init__(self, *args, **kwargs):
118118
unittest.TestCase.__init__(self, *args, **kwargs)
119119

@@ -126,10 +126,10 @@ def sourcerange(self, top, bottom):
126126
def assertSourceEqual(self, obj, top, bottom):
127127
self.assertEqual(inspect.getsource(obj),
128128
self.sourcerange(top, bottom))
129-
129+
130130
class TestRetrievingSourceCode(GetSourceBase):
131131
fodderFile = mod
132-
132+
133133
def test_getclasses(self):
134134
classes = inspect.getmembers(mod, inspect.isclass)
135135
self.assertEqual(classes,
@@ -147,7 +147,7 @@ def test_getclasses(self):
147147
]
148148
]
149149
])
150-
150+
151151
def test_getfunctions(self):
152152
functions = inspect.getmembers(mod, inspect.isfunction)
153153
self.assertEqual(functions, [('eggs', mod.eggs),
@@ -172,8 +172,8 @@ def test_getsource(self):
172172
self.assertSourceEqual(mod.StupidGit, 21, 46)
173173

174174
def test_getsourcefile(self):
175-
self.assertEqual(inspect.getsourcefile(mod.spam), modfile)
176-
self.assertEqual(inspect.getsourcefile(git.abuse), modfile)
175+
self.assertEqual(inspect.getsourcefile(mod.spam), modfile)
176+
self.assertEqual(inspect.getsourcefile(git.abuse), modfile)
177177

178178
def test_getfile(self):
179179
self.assertEqual(inspect.getfile(mod.StupidGit), mod.__file__)
@@ -192,38 +192,38 @@ class TestOneliners(GetSourceBase):
192192
def test_oneline_lambda(self):
193193
# Test inspect.getsource with a one-line lambda function.
194194
self.assertSourceEqual(mod2.oll, 25, 25)
195-
195+
196196
def test_threeline_lambda(self):
197197
# Test inspect.getsource with a three-line lambda function,
198198
# where the second and third lines are _not_ indented.
199-
self.assertSourceEqual(mod2.tll, 28, 30)
200-
199+
self.assertSourceEqual(mod2.tll, 28, 30)
200+
201201
def test_twoline_indented_lambda(self):
202202
# Test inspect.getsource with a two-line lambda function,
203203
# where the second line _is_ indented.
204204
self.assertSourceEqual(mod2.tlli, 33, 34)
205-
205+
206206
def test_onelinefunc(self):
207207
# Test inspect.getsource with a regular one-line function.
208208
self.assertSourceEqual(mod2.onelinefunc, 37, 37)
209-
209+
210210
def test_manyargs(self):
211211
# Test inspect.getsource with a regular function where
212212
# the arguments are on two lines and _not_ indented and
213213
# the body on the second line with the last arguments.
214214
self.assertSourceEqual(mod2.manyargs, 40, 41)
215-
215+
216216
def test_twolinefunc(self):
217217
# Test inspect.getsource with a regular function where
218218
# the body is on two lines, following the argument list and
219219
# continued on the next line by a \\.
220220
self.assertSourceEqual(mod2.twolinefunc, 44, 45)
221-
221+
222222
def test_lambda_in_list(self):
223223
# Test inspect.getsource with a one-line lambda function
224224
# defined in a list, indented.
225225
self.assertSourceEqual(mod2.a[1], 49, 49)
226-
226+
227227
def test_anonymous(self):
228228
# Test inspect.getsource with a lambda function defined
229229
# as argument to another function.
@@ -233,7 +233,7 @@ def test_anonymous(self):
233233
def attrs_wo_objs(cls):
234234
return [t[:3] for t in inspect.classify_class_attrs(cls)]
235235

236-
class TestClassesAndFunctions(unittest.TestCase):
236+
class TestClassesAndFunctions(unittest.TestCase):
237237
def test_classic_mro(self):
238238
# Test classic-class method resolution order.
239239
class A: pass
@@ -284,7 +284,7 @@ def m(self):
284284

285285
def test_getargspec_sublistofone(self):
286286
def sublistOfOne((foo)): return 1
287-
287+
288288
self.assertArgSpecEquals(sublistOfOne, [['foo']])
289289

290290
def test_classify_oldstyle(self):
@@ -418,4 +418,3 @@ def test_main():
418418

419419
if __name__ == "__main__":
420420
test_main()
421-

Lib/test/test_zlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def test_empty_flush(self):
299299
self.failUnless(co.flush()) # Returns a zlib header
300300
dco = zlib.decompressobj()
301301
self.assertEqual(dco.flush(), "") # Returns nothing
302-
302+
303303

304304
def genblock(seed, length, step=1024, generator=random):
305305
"""length-byte stream of random data from a seed (in step-byte blocks)."""

Mac/OSX/fixapplepython23.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ def findline(lines, start):
4343
if lines[i][:len(start)] == start:
4444
return i
4545
return -1
46-
46+
4747
def fix(makefile, do_apply):
4848
"""Fix the Makefile, if required."""
4949
fixed = False
5050
lines = open(makefile).readlines()
51-
51+
5252
for old, new in CHANGES:
5353
i = findline(lines, new)
5454
if i >= 0:
@@ -61,7 +61,7 @@ def fix(makefile, do_apply):
6161
return 2
6262
lines[i] = new
6363
fixed = True
64-
64+
6565
if fixed:
6666
if do_apply:
6767
print 'fixapplepython23: Fix to Apple-installed Python 2.3 applied'
@@ -74,7 +74,7 @@ def fix(makefile, do_apply):
7474
else:
7575
print 'fixapplepython23: No fix needed, appears to have been applied before'
7676
return 0
77-
77+
7878
def makescript(filename, compiler):
7979
"""Create a wrapper script for a compiler"""
8080
dirname = os.path.split(filename)[0]
@@ -85,7 +85,7 @@ def makescript(filename, compiler):
8585
fp.close()
8686
os.chmod(filename, 0755)
8787
print 'fixapplepython23: Created', filename
88-
88+
8989
def main():
9090
# Check for -n option
9191
if len(sys.argv) > 1 and sys.argv[1] == '-n':
@@ -113,7 +113,6 @@ def main():
113113
# Finally fix the makefile
114114
rv = fix(MAKEFILE, do_apply)
115115
sys.exit(rv)
116-
116+
117117
if __name__ == '__main__':
118118
main()
119-

Tools/i18n/makelocalealias.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def print_differences(data, olddata):
6262
print '# updated %r -> %r to %r' % \
6363
(k, olddata[k], data[k])
6464
# Additions are not mentioned
65-
65+
6666
if __name__ == '__main__':
6767
data = locale.locale_alias.copy()
6868
data.update(parse(LOCALE_ALIAS))
@@ -71,4 +71,3 @@ def print_differences(data, olddata):
7171
print 'locale_alias = {'
7272
pprint(data)
7373
print '}'
74-

Tools/msi/msi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ def add_files(db):
977977
lib.add_file('python%s%s.lib' % (major, minor))
978978
# Add the mingw-format library
979979
if have_mingw:
980-
lib.add_file('libpython%s%s.a' % (major, minor))
980+
lib.add_file('libpython%s%s.a' % (major, minor))
981981
if have_tcl:
982982
# Add Tcl/Tk
983983
tcldirs = [(root, '../tcltk/lib', 'tcl')]

0 commit comments

Comments
 (0)