diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py
index c119c9a6930..88613ad2000 100644
--- a/Lib/CGIHTTPServer.py
+++ b/Lib/CGIHTTPServer.py
@@ -107,7 +107,7 @@ def run_cgi(self):
"""Execute a CGI script."""
path = self.path
dir, rest = self.cgi_info
-
+
i = path.find('/', len(dir) + 1)
while i >= 0:
nextdir = path[:i]
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index d1fd1d95112..75e8a5316eb 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -82,7 +82,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args):
except ValueError:
pass
- # Check if the SDK that is used during compilation actually exists,
+ # Check if the SDK that is used during compilation actually exists,
# the universal build requires the usage of a universal SDK and not all
# users have that installed by default.
sysroot = None
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 9cb67dd5569..9dce22b35b6 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -332,7 +332,7 @@ def ntransfercmd(self, cmd, rest=None):
# 1xx or error messages for LIST), so we just discard
# this response.
if resp[0] == '2':
- resp = self.getresp()
+ resp = self.getresp()
if resp[0] != '1':
raise error_reply, resp
else:
@@ -342,7 +342,7 @@ def ntransfercmd(self, cmd, rest=None):
resp = self.sendcmd(cmd)
# See above.
if resp[0] == '2':
- resp = self.getresp()
+ resp = self.getresp()
if resp[0] != '1':
raise error_reply, resp
conn, sockaddr = sock.accept()
diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py
index 445048440a9..03475f40607 100644
--- a/Lib/lib-tk/tkSimpleDialog.py
+++ b/Lib/lib-tk/tkSimpleDialog.py
@@ -50,9 +50,9 @@ def __init__(self, parent, title = None):
# If the master is not viewable, don't
# make the child transient, or else it
# would be opened withdrawn
- if parent.winfo_viewable():
+ if parent.winfo_viewable():
self.transient(parent)
-
+
if title:
self.title(title)
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index ee9b4a2082f..1e3d84b6328 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -596,7 +596,7 @@ def __init__(self, args, bufsize=0, executable=None,
# either have to redirect all three or none. If the subprocess
# user has only redirected one or two handles, we are
# automatically creating PIPEs for the rest. We should close
- # these after the process is started. See bug #1124861.
+ # these after the process is started. See bug #1124861.
if mswindows:
if stdin is None and p2cwrite is not None:
os.close(p2cwrite)
@@ -1142,7 +1142,7 @@ def _communicate(self, input):
# we can write up to PIPE_BUF bytes without risk
# blocking. POSIX defines PIPE_BUF >= 512
bytes_written = os.write(self.stdin.fileno(), buffer(input, input_offset, 512))
- input_offset += bytes_written
+ input_offset += bytes_written
if input_offset >= len(input):
self.stdin.close()
write_set.remove(self.stdin)
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 8c2a9799233..6d6e37897da 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -921,7 +921,7 @@ def test_readlines(self):
self.assertEquals(f.readlines(), [u'\ud55c\n', u'\uae00'])
class EncodedFileTest(unittest.TestCase):
-
+
def test_basic(self):
f = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80')
ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8')
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index ff7b39d11fd..b67dbe368d0 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -245,7 +245,7 @@ def test_resize_term(stdscr):
if hasattr(curses, 'resizeterm'):
lines, cols = curses.LINES, curses.COLS
curses.resizeterm(lines - 1, cols + 1)
-
+
if curses.LINES != lines - 1 or curses.COLS != cols + 1:
raise RuntimeError, "Expected resizeterm to update LINES and COLS"
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index a29f404f5f2..a9ee5bcab69 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1216,7 +1216,7 @@ class C(object):
except NameError:
pass
else:
- # _unicode_to_string used to modify slots in certain circumstances
+ # _unicode_to_string used to modify slots in certain circumstances
slots = (unicode("foo"), unicode("bar"))
class C(object):
__slots__ = slots
@@ -1231,7 +1231,7 @@ class C(object):
except (TypeError, UnicodeEncodeError):
pass
else:
- raise TestFailed, "[unichr(128)] slots not caught"
+ raise TestFailed, "[unichr(128)] slots not caught"
# Test leaks
class Counted(object):
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index ed97f84fefb..eee147e3858 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -224,13 +224,13 @@ def test_import_initless_directory_warning():
test_import_initless_directory_warning()
def test_infinite_reload():
- # Bug #742342 reports that Python segfaults (infinite recursion in C)
- # when faced with self-recursive reload()ing.
+ # Bug #742342 reports that Python segfaults (infinite recursion in C)
+ # when faced with self-recursive reload()ing.
- sys.path.insert(0, os.path.dirname(__file__))
- try:
- import infinite_reload
- finally:
- sys.path.pop(0)
+ sys.path.insert(0, os.path.dirname(__file__))
+ try:
+ import infinite_reload
+ finally:
+ sys.path.pop(0)
test_infinite_reload()
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py
index 264e2372213..18e6b677429 100644
--- a/Lib/test/test_mailbox.py
+++ b/Lib/test/test_mailbox.py
@@ -681,11 +681,11 @@ def dummy_factory (s):
box = self._factory(self._path, factory=dummy_factory)
folder = box.add_folder('folder1')
self.assert_(folder._factory is dummy_factory)
-
+
folder1_alias = box.get_folder('folder1')
self.assert_(folder1_alias._factory is dummy_factory)
-
+
class _TestMboxMMDF(TestMailbox):
@@ -767,15 +767,15 @@ def test_relock(self):
key1 = self._box.add(msg)
self._box.flush()
self._box.close()
-
+
self._box = self._factory(self._path)
self._box.lock()
key2 = self._box.add(msg)
self._box.flush()
self.assert_(self._box._locked)
self._box.close()
-
-
+
+
class TestMbox(_TestMboxMMDF):
@@ -805,7 +805,7 @@ def test_get_folder(self):
def dummy_factory (s):
return None
self._box = self._factory(self._path, dummy_factory)
-
+
new_folder = self._box.add_folder('foo.bar')
folder0 = self._box.get_folder('foo.bar')
folder0.add(self._template % 'bar')
@@ -901,7 +901,7 @@ def test_pack(self):
self.assert_(self._box.get_sequences() ==
{'foo':[1, 2, 3, 4, 5],
'unseen':[1], 'bar':[3], 'replied':[3]})
-
+
def _get_lock_path(self):
return os.path.join(self._path, '.mh_sequences.lock')
diff --git a/Lib/test/test_old_mailbox.py b/Lib/test/test_old_mailbox.py
index c8f6bac64bc..7bd555758a8 100644
--- a/Lib/test/test_old_mailbox.py
+++ b/Lib/test/test_old_mailbox.py
@@ -116,7 +116,7 @@ def setUp(self):
def tearDown(self):
os.unlink(self._path)
-
+
def test_from_regex (self):
# Testing new regex from bug #1633678
f = open(self._path, 'w')
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index f15ce09fb59..08f28f07076 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -610,7 +610,7 @@ def test_empty_array(self):
for typecode in 'cbBuhHiIlLfd':
a = array.array(typecode)
self.assertEqual(re.compile("bla").match(a), None)
- self.assertEqual(re.compile("").match(a).groups(), ())
+ self.assertEqual(re.compile("").match(a).groups(), ())
def run_re_tests():
from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index 2191f325c55..bb5e54920a7 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -252,7 +252,7 @@ def test_1463026_3():
gen.endDocument()
return result.getvalue() == start+''
-
+
# ===== Xmlfilterbase
def test_filter_basic():
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index ef7cea7be11..872a467a55b 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -288,7 +288,7 @@ def test_do_not_rehash_dict_keys(self):
self.assertEqual(sum(elem.hash_count for elem in d), n)
if hasattr(s, 'symmetric_difference_update'):
s.symmetric_difference_update(d)
- self.assertEqual(sum(elem.hash_count for elem in d), n)
+ self.assertEqual(sum(elem.hash_count for elem in d), n)
d2 = dict.fromkeys(set(d))
self.assertEqual(sum(elem.hash_count for elem in d), n)
d3 = dict.fromkeys(frozenset(d))
@@ -500,7 +500,7 @@ def __init__(self, iterable=[], newarg=None):
set.__init__(self, iterable)
class TestSetSubclassWithKeywordArgs(TestSet):
-
+
def test_keywords_in_subclass(self):
'SF bug #1486663 -- this used to erroneously raise a TypeError'
SetSubclassWithKeywordArgs(newarg=1)
@@ -1487,7 +1487,7 @@ def test_main(verbose=None):
test_classes = (
TestSet,
TestSetSubclass,
- TestSetSubclassWithKeywordArgs,
+ TestSetSubclassWithKeywordArgs,
TestFrozenSet,
TestFrozenSetSubclass,
TestSetOfSets,
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index ef8e9a24c64..ff974701933 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -373,7 +373,7 @@
... elif 1:
... pass
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (, line 2)
>>> if 1:
@@ -381,7 +381,7 @@
... elif 1:
... x() = 1
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (, line 4)
>>> if 1:
@@ -391,7 +391,7 @@
... else:
... pass
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (, line 2)
>>> if 1:
@@ -401,7 +401,7 @@
... else:
... pass
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (, line 4)
>>> if 1:
@@ -411,7 +411,7 @@
... else:
... x() = 1
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (, line 6)
"""