]> granicus.if.org Git - python/commitdiff
Whitespace normalization.
authorTim Peters <tim.peters@gmail.com>
Tue, 16 Jul 2002 21:35:23 +0000 (21:35 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 16 Jul 2002 21:35:23 +0000 (21:35 +0000)
14 files changed:
Lib/getopt.py
Lib/httplib.py
Lib/imaplib.py
Lib/rfc822.py
Lib/test/regrtest.py
Lib/test/test_atexit.py
Lib/test/test_b1.py
Lib/test/test_generators.py
Lib/test/test_httplib.py
Lib/test/test_signal.py
Lib/test/test_types.py
Lib/textwrap.py
Lib/urllib2.py
Lib/weakref.py

index c72621749d5e702d821bfe9a7624930429900a55..46aa7023dd718c987d690488c799cfa665542cb4 100644 (file)
@@ -9,7 +9,7 @@ provides two functions and an exception:
 
 getopt() -- Parse command line options
 gnu_getopt() -- Like getopt(), but allow option and non-option arguments
-to be intermixed. 
+to be intermixed.
 GetoptError -- exception (class) raised with 'opt' attribute, which is the
 option involved with the exception.
 """
@@ -103,7 +103,7 @@ def gnu_getopt(args, shortopts, longopts = []):
     If the first character of the option string is `+', or if the
     environment variable POSIXLY_CORRECT is set, then option
     processing stops as soon as a non-option argument is encountered.
-    
+
     """
 
     opts = []
index d9fd6dd292ed5dfd31ee62f66c49cee539405cb9..71a0e507e6713018b0711db6c274290a7d811c16 100644 (file)
@@ -276,7 +276,7 @@ class HTTPResponse:
                     break
                 if self.debuglevel > 0:
                     print "header:", skip
-            
+
         self.status = status
         self.reason = reason.strip()
         if version == 'HTTP/1.0':
@@ -482,7 +482,7 @@ class HTTPConnection:
         self._buffer = []
         self.__response = None
         self.__state = _CS_IDLE
-        
+
         self._set_hostport(host, port)
         if strict is not None:
             self.strict = strict
@@ -815,7 +815,7 @@ class SSLFile(SharedSocketClient):
     """File-like object wrapping an SSL socket."""
 
     BUFSIZE = 8192
-    
+
     def __init__(self, sock, ssl, bufsize=None):
         SharedSocketClient.__init__(self, sock)
         self._ssl = ssl
@@ -1139,7 +1139,7 @@ class LineAndFileWrapper:
             if amt is None:
                 return s + self._file.read()
             else:
-                return s + self._file.read(amt - len(s))                
+                return s + self._file.read(amt - len(s))
         else:
             assert amt <= self._line_left
             i = self._line_offset
@@ -1150,7 +1150,7 @@ class LineAndFileWrapper:
             if self._line_left == 0:
                 self._done()
             return s
-        
+
     def readline(self):
         s = self._line[self._line_offset:]
         self._done()
@@ -1207,7 +1207,7 @@ def test():
     h.close()
 
     if hasattr(socket, 'ssl'):
-        
+
         for host, selector in (('sourceforge.net', '/projects/python'),
                                ('dbserv2.theopalgroup.com', '/mediumfile'),
                                ('dbserv2.theopalgroup.com', '/smallfile'),
index ed03c56e41b3be396b29ee79614531ded06f2994..91e9cb99f70c34126529e25a5d0e0df83178af9c 100644 (file)
@@ -1058,7 +1058,7 @@ class IMAP4_SSL(IMAP4):
         # sslobj.read() sometimes returns < size bytes
         data = self.sslobj.read(size)
         while len(data) < size:
-                data += self.sslobj.read(size-len(data))
+            data += self.sslobj.read(size-len(data))
 
         return data
 
index 4b12c4b14a6ebea43f44cf3a48f3e98a022e7f1a..3d9e13f876eeacf61b74f09ff54cf63e75eed444 100644 (file)
@@ -443,7 +443,7 @@ class Message:
 
     def __contains__(self, name):
         """Determine whether a message contains the named header."""
-        return name.lower() in self.dict        
+        return name.lower() in self.dict
 
     def keys(self):
         """Get all of a message's header field names."""
index a5862259892514cdc7706d343d59f788b7233ed7..21d3457d22c006efe8e4844fb88cf70f8cfeacca 100755 (executable)
@@ -711,33 +711,33 @@ _expectations = {
         test_zlib
         """,
     'atheos':
-       """
-       test_al
-       test_cd
-       test_cl
-       test_curses
-       test_dl
-       test_email_codecs
-       test_gdbm
-       test_gl
-       test_imgfile
-       test_largefile
-       test_linuxaudiodev
-       test_locale
-       test_mhlib
-       test_mmap
-       test_mpz
-       test_nis
-       test_poll
-       test_popen2
-       test_resource
-       test_socket_ssl
-       test_socketserver
-       test_sunaudiodev
-       test_unicode_file
-       test_winreg
-       test_winsound
-       """,
+        """
+        test_al
+        test_cd
+        test_cl
+        test_curses
+        test_dl
+        test_email_codecs
+        test_gdbm
+        test_gl
+        test_imgfile
+        test_largefile
+        test_linuxaudiodev
+        test_locale
+        test_mhlib
+        test_mmap
+        test_mpz
+        test_nis
+        test_poll
+        test_popen2
+        test_resource
+        test_socket_ssl
+        test_socketserver
+        test_sunaudiodev
+        test_unicode_file
+        test_winreg
+        test_winsound
+        """,
 }
 
 class _ExpectedSkips:
index 07f5a7e80a98e3f041640014d90b796098a427a2..ad5bced509226198c061504242292c3182358a32 100644 (file)
@@ -38,7 +38,7 @@ def direct():
 import sys
 sys.exitfunc = direct
 
-# Make sure atexit doesn't drop 
+# Make sure atexit doesn't drop
 def indirect():
     print "indirect exit"
 
index afa0cf32f58a9366a74aa533b1be404ce56d4d17..cd828b161c9819551dbb3fcfecb0efd8eef7eafb 100644 (file)
@@ -102,9 +102,9 @@ compile('print 1\n', '', 'exec')
 
 print 'complex'
 class OS:
-   def __complex__(self): return 1+10j
+    def __complex__(self): return 1+10j
 class NS(object):
-   def __complex__(self): return 1+10j
+    def __complex__(self): return 1+10j
 if complex(OS()) != 1+10j: raise TestFailed, '__complex__ in old style class'
 if complex(NS()) != 1+10j: raise TestFailed, '__complex__ in new style class'
 if complex("1+10j") != 1+10j: raise TestFailed, 'complex("1+10j")'
index 17523ba71c92c1688ed69429bb59af1d9c917beb..55a6a9888807e3d4312a1ac9c00028998e30808c 100644 (file)
@@ -814,7 +814,7 @@ This one caused a crash (see SF bug 567538):
 ...             continue
 ...         finally:
 ...             yield i
-... 
+...
 >>> g = f()
 >>> print g.next()
 0
index 09f92fc46a9f40e9f465a0377a1ad625a68902d2..f70abec7ea5400ea552689238d7b2dfeb9451ebd 100644 (file)
@@ -56,4 +56,3 @@ r.begin()
 cookies = r.getheader("Set-Cookie")
 if cookies != hdr:
     raise AssertionError, "multiple headers not combined properly"
-               
index 78b90b70173af446843da296e0f2981d87bdbf6a..951e58ad3eec11fd0a545579049cb8cf1bc2a867 100644 (file)
@@ -125,4 +125,3 @@ if hasattr(signal, "sigprocmask"):
             pass
         else:
             raise TestFailed, "sigsupsend didn't raise"
-    
index bec023728be26bff816f852074f424ff202834fb..87a70fb18dc9d1f012ff5c1edae7325d4dae7d07 100644 (file)
@@ -211,7 +211,7 @@ if have_unicode:
     vereq(a[-100:100:], a)
     vereq(a[100:-100:-1], a[::-1])
     vereq(a[-100L:100L:2L], unicode('02468', 'ascii'))
-    
+
 
 print '6.5.2 Tuples'
 if len(()) != 0: raise TestFailed, 'len(())'
index e8f9add6f36a222df9c926a0c11be3b2af7b4923..fb8d3b841d438e92678375b52a0143211f2b70e1 100644 (file)
@@ -48,7 +48,7 @@ class TextWrapper:
     whitespace_trans = string.maketrans(string.whitespace,
                                         ' ' * len(string.whitespace))
 
-    # This funky little regex is just the trick for splitting 
+    # This funky little regex is just the trick for splitting
     # text up into word-wrappable chunks.  E.g.
     #   "Hello there -- you goof-ball, use the -b option!"
     # splits into
@@ -81,7 +81,7 @@ class TextWrapper:
         self.replace_whitespace = replace_whitespace
         self.fix_sentence_endings = fix_sentence_endings
         self.break_long_words = break_long_words
-        
+
 
     # -- Private methods -----------------------------------------------
     # (possibly useful for subclasses to override)
@@ -209,7 +209,7 @@ class TextWrapper:
                     break
 
             # The current line is full, and the next chunk is too big to
-            # fit on *any* line (not just this one).  
+            # fit on *any* line (not just this one).
             if chunks and len(chunks[0]) > width:
                 self._handle_long_word(chunks, cur_line, cur_len, width)
 
index 60c60d4eed685490e80dd5a3b27fa70053f03764..9a4ad3c84ca1ca9472662c83bd35adff3d75191a 100644 (file)
@@ -165,7 +165,7 @@ class HTTPError(URLError, addinfourl):
         # The addinfourl classes depend on fp being a valid file
         # object.  In some cases, the HTTPError may not have a valid
         # file object.  If this happens, the simplest workaround is to
-        # not initialize the base classes.  
+        # not initialize the base classes.
         if fp is not None:
             self.__super_init(fp, hdrs, url)
 
@@ -460,7 +460,7 @@ class ProxyHandler(BaseHandler):
             user_pass, host = host.split('@', 1)
             if ':' in user_pass:
                 user, password = user_pass.split(':', 1)
-                user_pass = base64.encodestring('%s:%s' % (unquote(user), 
+                user_pass = base64.encodestring('%s:%s' % (unquote(user),
                                                            unquote(password)))
                 req.add_header('Proxy-Authorization', 'Basic ' + user_pass)
         host = unquote(host)
index a1fa4e82de423cabf56962c0186ffb1b70bdb859..6153bd966d6bfc244b3a96a12f1149b9b1da8bd3 100644 (file)
@@ -191,7 +191,7 @@ class WeakKeyDictionary(UserDict.UserDict):
         except TypeError:
             return 0
         return wr in self.data
-    
+
     def items(self):
         L = []
         for key, value in self.data.items():