changeset 2450:3d08f1cb4429

pep8 whitespace fixes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 20 Jul 2007 22:53:30 +0200
parents c9949c55ff5e
children ac7f57165c9a
files MoinMoin/_tests/test_sourcecode.py MoinMoin/action/rss_rc.py MoinMoin/filter/EXIF.py MoinMoin/formatter/text_docbook.py MoinMoin/mail/mailimport.py MoinMoin/script/export/dump.py MoinMoin/script/xmlrpc/mailimport.py MoinMoin/script/xmlrpc/remote.py MoinMoin/search/results.py MoinMoin/server/server_twisted.py
diffstat 10 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_sourcecode.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/_tests/test_sourcecode.py	Fri Jul 20 22:53:30 2007 +0200
@@ -30,7 +30,7 @@
 FIX_TS_RE = re.compile(r' +$', re.M) # 'fix' mode: everything matching the trailing space re will be removed
 
 RECENTLY = time.time() - 7 * 24*60*60 # we only check stuff touched recently.
-#RECENTLY = 0 # check everything!
+RECENTLY = 0 # check everything!
 # After doing a fresh clone, this procedure is recommended:
 # 1. Run the tests once to see if everything is OK (as cloning updates the mtime,
 #    it will test every file).
--- a/MoinMoin/action/rss_rc.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/action/rss_rc.py	Fri Jul 20 22:53:30 2007 +0200
@@ -200,7 +200,7 @@
                 for idx in range(rl):
                     rev = revisions[idx]
                     if rev <= item.rev:
-                        if idx+1 < rl:
+                        if idx + 1 < rl:
                             lines = wikiutil.pagediff(request, item.pagename, revisions[idx+1], item.pagename, 0, ignorews=1)
                             if len(lines) > 20:
                                 lines = lines[:20] + ['...\n']
--- a/MoinMoin/filter/EXIF.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/filter/EXIF.py	Fri Jul 20 22:53:30 2007 +0200
@@ -738,8 +738,8 @@
     def reduce(self):
         div = gcd(self.num, self.den)
         if div > 1:
-            self.num = self.num/div
-            self.den = self.den/div
+            self.num = self.num / div
+            self.den = self.den / div
 
 # for ease of dealing with tags
 class IFD_Tag:
@@ -845,7 +845,7 @@
             typelen = FIELD_TYPES[field_type][0]
             count = self.s2n(entry+4, 4)
             offset = entry+8
-            if count*typelen > 4:
+            if count * typelen > 4:
                 # offset is not the value; it's a pointer to the value
                 # if relative we set things up so s2n will seek to the right
                 # place when it adds self.offset.  Note that this 'relative'
@@ -879,7 +879,7 @@
                     else:
                         value = self.s2n(offset, typelen, signed)
                     values.append(value)
-                    offset = offset+typelen
+                    offset = offset + typelen
             # now "values" is either a string or an array
             if count == 1 and field_type != 2:
                 printable = str(values[0])
@@ -924,24 +924,24 @@
 
         # fix up large value offset pointers into data area
         for i in range(entries):
-            entry = thumb_ifd+2+12*i
+            entry = thumb_ifd + 2 + 12 * i
             tag = self.s2n(entry, 2)
             field_type = self.s2n(entry+2, 2)
             typelen = FIELD_TYPES[field_type][0]
             count = self.s2n(entry+4, 4)
             oldoff = self.s2n(entry+8, 4)
             # start of the 4-byte pointer area in entry
-            ptr = i*12+18
+            ptr = i * 12 + 18
             # remember strip offsets location
             if tag == 0x0111:
                 strip_off = ptr
-                strip_len = count*typelen
+                strip_len = count * typelen
             # is it in the data area?
-            if count*typelen > 4:
+            if count * typelen > 4:
                 # update offset pointer (nasty "strings are immutable" crap)
                 # should be able to say "tiff[ptr:ptr+4]=newoff"
                 newoff = len(tiff)
-                tiff = tiff[:ptr]+self.n2s(newoff, 4)+tiff[ptr+4:]
+                tiff = tiff[:ptr] + self.n2s(newoff, 4) + tiff[ptr+4:]
                 # remember strip offsets location
                 if tag == 0x0111:
                     strip_off = newoff
--- a/MoinMoin/formatter/text_docbook.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/formatter/text_docbook.py	Fri Jul 20 22:53:30 2007 +0200
@@ -156,7 +156,7 @@
             # try to go to higher level if needed
             if depth <= self.curdepth:
                 # number of levels we want to go higher
-                numberOfLevels = self.curdepth-depth + 1
+                numberOfLevels = self.curdepth - depth + 1
                 for dummy in range(numberOfLevels):
                     #find first non section node
                     while (self.cur.nodeName != "section" and self.cur.nodeName != "article"):
--- a/MoinMoin/mail/mailimport.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/mail/mailimport.py	Fri Jul 20 22:53:30 2007 +0200
@@ -43,7 +43,7 @@
 
 def log(text):
     if debug:
-        print >>sys.stderr, text
+        print >> sys.stderr, text
 
 def decode_2044(header):
     """ Decodes header field. See RFC 2044. """
@@ -322,5 +322,5 @@
     try:
         import_mail_from_file(request, infile)
     except ProcessingError, e:
-        print >>sys.stderr, "An error occured while processing the message:", e.args
+        print >> sys.stderr, "An error occured while processing the message:", e.args
 
--- a/MoinMoin/script/export/dump.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/script/export/dump.py	Fri Jul 20 22:53:30 2007 +0200
@@ -155,9 +155,9 @@
                     pagehtml = request.redirectedOutput(page.send_page, count_hit=0, content_only=1)
                 except:
                     errcnt = errcnt + 1
-                    print >>sys.stderr, "*** Caught exception while writing page!"
-                    print >>errlog, "~" * 78
-                    print >>errlog, file # page filename
+                    print >> sys.stderr, "*** Caught exception while writing page!"
+                    print >> errlog, "~" * 78
+                    print >> errlog, file # page filename
                     import traceback
                     traceback.print_exc(None, errlog)
             finally:
@@ -186,5 +186,5 @@
 
         errlog.close()
         if errcnt:
-            print >>sys.stderr, "*** %d error(s) occurred, see '%s'!" % (errcnt, errfile)
+            print >> sys.stderr, "*** %d error(s) occurred, see '%s'!" % (errcnt, errfile)
 
--- a/MoinMoin/script/xmlrpc/mailimport.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/script/xmlrpc/mailimport.py	Fri Jul 20 22:53:30 2007 +0200
@@ -35,5 +35,5 @@
         result = s.ProcessMail(secret, xmlrpclib.Binary(input.read()))
 
         if result != "OK":
-            print >>sys.stderr, result
+            print >> sys.stderr, result
 
--- a/MoinMoin/script/xmlrpc/remote.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/script/xmlrpc/remote.py	Fri Jul 20 22:53:30 2007 +0200
@@ -38,5 +38,5 @@
         # TODO handle stdout, stderr
 
         if result != "OK":
-            print >>sys.stderr, result
+            print >> sys.stderr, result
 
--- a/MoinMoin/search/results.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/search/results.py	Fri Jul 20 22:53:30 2007 +0200
@@ -396,7 +396,7 @@
             write(f.definition_list(1))
 
             if paging:
-                hitsTo = hitsFrom+request.cfg.search_results_per_page
+                hitsTo = hitsFrom + request.cfg.search_results_per_page
                 displayHits = self.hits[hitsFrom:hitsTo]
             else:
                 displayHits = self.hits
@@ -697,7 +697,7 @@
             ]) for i in page_range])
 
         # next page available
-        if cur_page < pages-1:
+        if cur_page < pages - 1:
             textlinks.append(''.join([
                 f.url(1, href=page_url(cur_page+1)),
                 f.text(_('Next')),
--- a/MoinMoin/server/server_twisted.py	Fri Jul 20 22:26:57 2007 +0200
+++ b/MoinMoin/server/server_twisted.py	Fri Jul 20 22:53:30 2007 +0200
@@ -206,7 +206,7 @@
     port = 8080
     interfaces = ['']
     threads = 10
-    timeout = 15*60 # 15 minutes
+    timeout = 15 * 60 # 15 minutes
     logPath = None # moin log file
     logPath_twisted = None # Twisted log file
     virtualHosts = None