]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Whitespace normalization
authorNeal Norwitz <nnorwitz@gmail.com>
Wed, 25 Apr 2007 06:42:41 +0000 (06:42 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Wed, 25 Apr 2007 06:42:41 +0000 (06:42 +0000)
15 files changed:
Lib/CGIHTTPServer.py
Lib/distutils/unixccompiler.py
Lib/ftplib.py
Lib/lib-tk/tkSimpleDialog.py
Lib/subprocess.py
Lib/test/test_codecs.py
Lib/test/test_curses.py
Lib/test/test_descr.py
Lib/test/test_import.py
Lib/test/test_mailbox.py
Lib/test/test_old_mailbox.py
Lib/test/test_re.py
Lib/test/test_sax.py
Lib/test/test_set.py
Lib/test/test_syntax.py

index c119c9a6930d23af7310cc3af38eda4382aa2889..88613ad200018b2cd6000b146091d9648cc0371a 100644 (file)
@@ -107,7 +107,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
         """Execute a CGI script."""
         path = self.path
         dir, rest = self.cgi_info
-        
+
         i = path.find('/', len(dir) + 1)
         while i >= 0:
             nextdir = path[:i]
index d1fd1d95112ac023aad7badaf874a3745ef02a62..75e8a5316ebba254884a9af1b6388d075ff3efb2 100644 (file)
@@ -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
index 9cb67dd55691654df0368f86db2b13ae45b2b810..9dce22b35b66b2604e28764662052d36ab9f696c 100644 (file)
@@ -332,7 +332,7 @@ class FTP:
             # 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 @@ class FTP:
             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()
index 445048440a9ed936bb741df6c4aff441628a82a7..03475f4060789bf8c114e009a1a841af5920d3cb 100644 (file)
@@ -50,9 +50,9 @@ class Dialog(Toplevel):
         # 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)
 
index ee9b4a2082fac525ff325724e22b439037f7a5a5..1e3d84b6328e7162c90d00a5562d30112d51be24 100644 (file)
@@ -596,7 +596,7 @@ class Popen(object):
         # 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 @@ class Popen(object):
                     # 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)
index 8c2a9799233cc7bda2786196f50bdf56d6f17dbc..6d6e37897daa389847a0f9eb5c7589d9673b67f1 100644 (file)
@@ -921,7 +921,7 @@ class StreamReaderTest(unittest.TestCase):
         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')
index ff7b39d11fd04b351301631ce1aa3299604888e5..b67dbe368d003add168c050058cafed7255490e9 100644 (file)
@@ -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"
 
index a29f404f5f2d83c7c77e39bbeade7a71f661dec6..a9ee5bcab69c425f5f852a38b1c7c211dbf59b0d 100644 (file)
@@ -1216,7 +1216,7 @@ def slots():
     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 @@ def slots():
         except (TypeError, UnicodeEncodeError):
             pass
         else:
-            raise TestFailed, "[unichr(128)] slots not caught" 
+            raise TestFailed, "[unichr(128)] slots not caught"
 
     # Test leaks
     class Counted(object):
index ed97f84fefb666bfe19b1c3b60229d4459e2bf17..eee147e385810b8ab661270ba6d848ed28e05379 100644 (file)
@@ -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.
-
-     sys.path.insert(0, os.path.dirname(__file__))
-     try:
-         import infinite_reload
-     finally:
-         sys.path.pop(0)
+    # 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)
 
 test_infinite_reload()
index 264e23722137c05f37165704ace5dc155379d6d9..18e6b677429b850262b466bf0ba7e88556f6a711 100644 (file)
@@ -681,11 +681,11 @@ class TestMaildir(TestMailbox):
         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 @@ class _TestMboxMMDF(TestMailbox):
         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 @@ class TestMH(TestMailbox):
         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 @@ class TestMH(TestMailbox):
         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')
 
index c8f6bac64bcefcf7965a1a0df72b78897af29588..7bd555758a83023b13e204d7407f687037d437ab 100644 (file)
@@ -116,7 +116,7 @@ class MboxTestCase(unittest.TestCase):
 
     def tearDown(self):
         os.unlink(self._path)
-    
+
     def test_from_regex (self):
         # Testing new regex from bug #1633678
         f = open(self._path, 'w')
index f15ce09fb592c248b0e190b441c80c044489b115..08f28f0707628228e168923e3d0ad44ce420a3ce 100644 (file)
@@ -610,7 +610,7 @@ class ReTests(unittest.TestCase):
         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
index 2191f325c555e65724f9df70f7c53331fd8228be..bb5e54920a7f26467e75da0c439592c426d71922 100644 (file)
@@ -252,7 +252,7 @@ def test_1463026_3():
     gen.endDocument()
 
     return result.getvalue() == start+'<my:a xmlns:my="qux" b="c"></my:a>'
-    
+
 # ===== Xmlfilterbase
 
 def test_filter_basic():
index ef7cea7be1110d1c68b267b7b4d4c63f42cc2e76..872a467a55b03f99c562b59fd6c1f1924d6830a3 100644 (file)
@@ -288,7 +288,7 @@ class TestJointOps(unittest.TestCase):
         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 @@ class SetSubclassWithKeywordArgs(set):
         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,
index ef8e9a24c64612eb6cd2a02342c53613d3e52c95..ff9747019337dfb5749899de22a99913ca6308f6 100644 (file)
@@ -373,7 +373,7 @@ leading to spurious errors.
    ... elif 1:
    ...   pass
    Traceback (most recent call last):
-     ... 
+     ...
    SyntaxError: can't assign to function call (<doctest test.test_syntax[44]>, line 2)
 
    >>> if 1:
@@ -381,7 +381,7 @@ leading to spurious errors.
    ... elif 1:
    ...   x() = 1
    Traceback (most recent call last):
-     ... 
+     ...
    SyntaxError: can't assign to function call (<doctest test.test_syntax[45]>, line 4)
 
    >>> if 1:
@@ -391,7 +391,7 @@ leading to spurious errors.
    ... else:
    ...   pass
    Traceback (most recent call last):
-     ... 
+     ...
    SyntaxError: can't assign to function call (<doctest test.test_syntax[46]>, line 2)
 
    >>> if 1:
@@ -401,7 +401,7 @@ leading to spurious errors.
    ... else:
    ...   pass
    Traceback (most recent call last):
-     ... 
+     ...
    SyntaxError: can't assign to function call (<doctest test.test_syntax[47]>, line 4)
 
    >>> if 1:
@@ -411,7 +411,7 @@ leading to spurious errors.
    ... else:
    ...   x() = 1
    Traceback (most recent call last):
-     ... 
+     ...
    SyntaxError: can't assign to function call (<doctest test.test_syntax[48]>, line 6)
 
 """