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

Skip to content

Commit 9e34c04

Browse files
committed
Whitespace normalization (via reindent.py).
1 parent e8889c5 commit 9e34c04

10 files changed

Lines changed: 19 additions & 23 deletions

File tree

Lib/distutils/dir_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0):
3131
global _path_created
3232

3333
# Detect a common bug -- name is None
34-
if not isinstance(name, StringTypes):
34+
if not isinstance(name, StringTypes):
3535
raise DistutilsInternalError, \
3636
"mkpath: 'name' must be a string (got %r)" % (name,)
3737

Lib/hashlib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,3 @@ def __hash_new(name, string=''):
107107
sha256 = __get_builtin_constructor('sha256')
108108
sha384 = __get_builtin_constructor('sha384')
109109
sha512 = __get_builtin_constructor('sha512')
110-

Lib/random.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def sample(self, population, k):
303303
result = [None] * k
304304
setsize = 21 # size of a small set minus size of an empty list
305305
if k > 5:
306-
setsize += 4 ** _ceil(_log(k * 3, 4)) # table size for big sets
306+
setsize += 4 ** _ceil(_log(k * 3, 4)) # table size for big sets
307307
if n <= setsize: # is an n-length list smaller than a k-length set
308308
pool = list(population)
309309
for i in xrange(k): # invariant: non-selected at [0,n-i)

Lib/test/seq_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class DoNotTestEq(Exception):
228228
class StopCompares:
229229
def __eq__(self, other):
230230
raise DoNotTestEq
231-
231+
232232
checkfirst = self.type2test([1, StopCompares()])
233233
self.assert_(1 in checkfirst)
234234
checklast = self.type2test([StopCompares(), 1])

Lib/test/test_generators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,18 +709,18 @@
709709
Ye olde Fibonacci generator, tee style.
710710
711711
>>> def fib():
712-
...
712+
...
713713
... def _isum(g, h):
714714
... while 1:
715715
... yield g.next() + h.next()
716-
...
716+
...
717717
... def _fib():
718718
... yield 1
719719
... yield 2
720720
... fibTail.next() # throw first away
721721
... for res in _isum(fibHead, fibTail):
722722
... yield res
723-
...
723+
...
724724
... fibHead, fibTail, fibRes = tee(_fib(), 3)
725725
... return fibRes
726726

Lib/test/test_hashlib_speed.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,3 @@ def test_zero():
9090
test_scaled_msg(scale=106, name='[small data]')
9191
test_scaled_msg(scale=creatorFunc().digest_size, name='[digest_size data]')
9292
test_scaled_msg(scale=10, name='[tiny data]')
93-

Lib/test/test_mmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def test_both():
126126
f.seek(0, 2)
127127
verify(f.tell() == 512, 'Underlying file not truncated')
128128
f.close()
129-
verify(m.size() == 512, 'New size not reflected in file')
129+
verify(m.size() == 512, 'New size not reflected in file')
130130

131131
m.close()
132132

Lib/urllib2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ def parse_keqv_list(l):
10691069

10701070
def parse_http_list(s):
10711071
"""Parse lists as described by RFC 2068 Section 2.
1072-
1072+
10731073
In particular, parse comma-separated lists where the elements of
10741074
the list may include quoted-strings. A quoted-string could
10751075
contain a comma. A non-quoted string could have quotes in the
@@ -1101,7 +1101,7 @@ def parse_http_list(s):
11011101

11021102
if cur == '"':
11031103
quote = True
1104-
1104+
11051105
part += cur
11061106

11071107
# append last part

Tools/scripts/findnocoding.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def walk_python_files(self, paths, *args, **kwargs):
2626
if filename.endswith(".py"):
2727
yield os.path.join(root, filename)
2828
pysource = pysource()
29-
30-
29+
30+
3131
print >>sys.stderr, ("The pysource module is not available; "
3232
"no sophisticated Python source file search will be done.")
3333

@@ -56,19 +56,19 @@ def needs_declaration(fullpath):
5656

5757
line1 = infile.readline()
5858
line2 = infile.readline()
59-
59+
6060
if get_declaration(line1) or get_declaration(line2):
6161
# the file does have an encoding declaration, so trust it
6262
infile.close()
6363
return False
64-
64+
6565
# check the whole file for non-ASCII characters
6666
rest = infile.read()
6767
infile.close()
68-
68+
6969
if has_correct_encoding(line1+line2+rest, "ascii"):
7070
return False
71-
71+
7272
return True
7373

7474

@@ -102,5 +102,3 @@ def needs_declaration(fullpath):
102102
result = needs_declaration(fullpath)
103103
if result:
104104
print fullpath
105-
106-

Tools/scripts/pysource.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ def looks_like_python(fullpath):
5757

5858
line = infile.readline()
5959
infile.close()
60-
60+
6161
if binary_re.search(line):
6262
# file appears to be binary
6363
print_debug("%s: appears to be binary" % fullpath)
6464
return False
65-
65+
6666
if fullpath.endswith(".py") or fullpath.endswith(".pyw"):
6767
return True
6868
elif "python" in line:
@@ -95,12 +95,12 @@ def walk_python_files(paths, is_python=looks_like_python, exclude_dirs=None):
9595
paths: a list of files and/or directories to be checked.
9696
is_python: a function that takes a file name and checks whether it is a
9797
Python source file
98-
exclude_dirs: a list of directory base names that should be excluded in
98+
exclude_dirs: a list of directory base names that should be excluded in
9999
the search
100100
"""
101101
if exclude_dirs is None:
102102
exclude_dirs=[]
103-
103+
104104
for path in paths:
105105
print_debug("testing: %s" % path)
106106
if os.path.isfile(path):

0 commit comments

Comments
 (0)