changeset 3120:a7c1680aeaa0

PEP8 fixes, mostly whitespace
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 26 Feb 2008 02:04:08 +0100
parents 2a380f99afa8
children ca1c60a5285c
files MoinMoin/_tests/test_user.py MoinMoin/config/multiconfig.py MoinMoin/formatter/text_html_percent.py MoinMoin/i18n/__init__.py MoinMoin/script/maint/globaledit.py MoinMoin/script/migration/data.py MoinMoin/script/server/standalone.py MoinMoin/server/server_fastcgi.py MoinMoin/user.py contrib/googleimport/driver.py
diffstat 10 files changed, 24 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_user.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/MoinMoin/_tests/test_user.py	Tue Feb 26 02:04:08 2008 +0100
@@ -158,7 +158,7 @@
         theUser = user.User(self.request, name=name, password=password)
         theUser.subscribe(pagename)
         assert not theUser.isSubscribedTo([testPagename]) # list(!) of pages to check
-        
+
     def testRenameUser(self):
         """ create user and then rename user and check
         if the old username is removed from the cache name2id
@@ -175,7 +175,7 @@
         theUser.name = u'__SomeName__'
         theUser.save()
         theUser = user.User(self.request, name=name, password=password)
-        
+
         assert not theUser.exists()
 
     # Helpers ---------------------------------------------------------
--- a/MoinMoin/config/multiconfig.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/MoinMoin/config/multiconfig.py	Tue Feb 26 02:04:08 2008 +0100
@@ -294,15 +294,15 @@
 Headings: Heading 1  Heading 2  Heading 3
           =========  ---------  ~~~~~~~~~
 
-Horizontal rule: ---- 
+Horizontal rule: ----
 
-Links: TrailingUnderscore_ `multi word with backticks`_ external_ 
+Links: TrailingUnderscore_ `multi word with backticks`_ external_
 
 .. _external: http://external-site.example.org/foo/
 
 Lists: * bullets; 1., a. numbered items.
 }}}
-(!) For more help, see the 
+(!) For more help, see the
 [[http://docutils.sourceforge.net/docs/user/rst/quickref.html|reStructuredText Quick Reference]].
 """),
     }
--- a/MoinMoin/formatter/text_html_percent.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/MoinMoin/formatter/text_html_percent.py	Tue Feb 26 02:04:08 2008 +0100
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - a special text/html formatter used by the i18n system
-    
+
     If texts translated by the i18n system are used on the left side of a
     % operator, any markup-generated % char (e.g. in links to non-ASCII page
     names (%XX%XX%XX)) needs to get escaped (%%XX%%XX%%XX).
--- a/MoinMoin/i18n/__init__.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/MoinMoin/i18n/__init__.py	Tue Feb 26 02:04:08 2008 +0100
@@ -159,10 +159,10 @@
 
     def formatMarkup(self, request, text, percent):
         """ Formats the text using the wiki parser/formatter.
-        
+
         This raises an exception if a text needs itself to be translated,
         this could possibly happen with macros.
-        
+
         @param request: the request object
         @param text: the text to format
         @param percent: True if result is used as left-side of a % operator and
@@ -235,7 +235,7 @@
 
 def getText(original, request, lang, **kw):
     """ Return a translation of some original text.
-    
+
     @param original: the original (english) text
     @param request: the request object
     @lang: the target language for the translation
@@ -247,7 +247,7 @@
                       e.g. in wiki links to non-ascii pagenames (%XX%XX%XX).
                       False, if we don't use it as a left-side of % operator.
                       Only specify this option for formatted==True, it doesn't do
-                      anything for formatted==False. 
+                      anything for formatted==False.
     """
     formatted = kw.get('formatted', True) # TODO: change to False, review all _() calls
     percent = kw.get('percent', False) # TODO: review all _() calls
@@ -377,7 +377,7 @@
 
 def get_browser_language(request):
     """
-    Return the language that is supported by wiki and what user browser 
+    Return the language that is supported by wiki and what user browser
     would prefer to get. Return empty string if there is no such language
     or language_ignore_browser is true.
 
@@ -391,3 +391,4 @@
             if lang in available:
                 return lang
     return ''
+
--- a/MoinMoin/script/maint/globaledit.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/MoinMoin/script/maint/globaledit.py	Tue Feb 26 02:04:08 2008 +0100
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
 MoinMoin - do global changes to all pages in a wiki.
-  
+
 @copyright: 2004-2006 MoinMoin:ThomasWaldmann
 @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/script/migration/data.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/MoinMoin/script/migration/data.py	Tue Feb 26 02:04:08 2008 +0100
@@ -12,7 +12,7 @@
     Important: you must have run all 12_to_13* and the final 152_to_1050300
                mig scripts ONCE and in correct order manually before attempting
                to use the new style migration stuff.
-               
+
     @copyright: 2006 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
--- a/MoinMoin/script/server/standalone.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/MoinMoin/script/server/standalone.py	Tue Feb 26 02:04:08 2008 +0100
@@ -61,12 +61,12 @@
             "--pidfile", dest="pidfile",
             help="Set file to store pid of moin daemon in. Default: moin.pid"
         )
-    
+
     def mainloop(self):
         # we don't expect non-option arguments
         if self.args:
             self.parser.error("incorrect number of arguments")
-        
+
         thread_choices = ["ThreadPool", "Threading", "Forking", "Simple"]
         serverClass = "ThreadPool"
         if self.options.serverClass:
@@ -77,11 +77,11 @@
             except ValueError:
                 self.parser.error("invalid serverClass type")
             serverClass = thread_choices[serverClass_index]
-       
+
         pidfile = "moin.pid"
         if self.options.pidfile:
             pidfile = self.options.pidfile
-        
+
         if self.options.stop:
             try:
                 pids = open(pidfile, "r").read()
@@ -100,7 +100,7 @@
                 from wikiserverconfig import Config
             except ImportError:
                 Config = DefaultConfig
-            
+
             if self.options.docs:
                 Config.docs = self.options.docs
             if self.options.user:
@@ -114,7 +114,7 @@
                 Config.threadLimit = self.options.threadLimit
             if self.options.requestQueueSize:
                 Config.requestQueueSize = self.options.requestQueueSize
-            
+
             if self.options.start:
                 daemon = Daemon('moin', run, Config)
                 daemon.pidfile = pidfile
--- a/MoinMoin/server/server_fastcgi.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/MoinMoin/server/server_fastcgi.py	Tue Feb 26 02:04:08 2008 +0100
@@ -9,12 +9,12 @@
     Minimal usage:
 
         from MoinMoin.server.server_fastcgi import FastCgiConfig, run
-        
+
         class Config(FastCgiConfig):
             pass
 
         run(Config)
-        
+
     See more options in FastCgiConfig class.
 
     @copyright: 2007 MoinMoin:ThomasWaldmann
--- a/MoinMoin/user.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/MoinMoin/user.py	Tue Feb 26 02:04:08 2008 +0100
@@ -623,7 +623,7 @@
             del self._request.cfg.cache.name2id
         except:
             pass
-        
+
         if not self.disabled:
             self.valid = 1
 
--- a/contrib/googleimport/driver.py	Tue Feb 26 00:19:10 2008 +0100
+++ b/contrib/googleimport/driver.py	Tue Feb 26 02:04:08 2008 +0100
@@ -36,7 +36,7 @@
 def find_dict_entry(name, text):
     m = re.search(r"^ %s:: (.*)$" % (name, ), text, re.M | re.U)
     if not m:
-        raise DataNotFoundException("%s not found" % (name,))
+        raise DataNotFoundException("%s not found" % (name, ))
     return m.groups()[0]
 
 desc_pattern = r"""== Short Description ==