diff MoinMoin/config/multiconfig.py @ 2286:01f05e74aa9c

Big PEP8 and whitespace cleanup
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 02 Jul 2007 23:33:20 +0200
parents c8ff348927db
children 5cf429e40f18 10be78f1fa97
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/config/multiconfig.py	Mon Jul 02 23:33:20 2007 +0200
@@ -25,10 +25,10 @@
 
 def _importConfigModule(name):
     """ Import and return configuration module and its modification time
-    
+
     Handle all errors except ImportError, because missing file is not
     always an error.
-    
+
     @param name: module name
     @rtype: tuple
     @return: module, modification time
@@ -89,7 +89,7 @@
 
 
 def _makeConfig(name):
-    """ Create and return a config instance 
+    """ Create and return a config instance
 
     Timestamp config with either module mtime or farmconfig mtime. This
     mtime can be used later to invalidate older caches.
@@ -262,11 +262,11 @@
     default_markup = 'wiki'
     docbook_html_dir = r"/usr/share/xml/docbook/stylesheet/nwalsh/html/" # correct for debian sarge
 
-    edit_bar = ['Edit', 'Comments', 'Discussion', 'Info', 'Subscribe', 'Quicklink', 'Attachments', 'ActionsMenu'] 
+    edit_bar = ['Edit', 'Comments', 'Discussion', 'Info', 'Subscribe', 'Quicklink', 'Attachments', 'ActionsMenu']
     editor_default = 'text' # which editor is called when nothing is specified
     editor_ui = 'freechoice' # which editor links are shown on user interface
     editor_force = False
-    editor_quickhelp = {# editor markup hints quickhelp 
+    editor_quickhelp = {# editor markup hints quickhelp
         'wiki': _("""\
  Emphasis:: [[Verbatim('')]]''italics''[[Verbatim('')]]; [[Verbatim(''')]]'''bold'''[[Verbatim(''')]]; [[Verbatim(''''')]]'''''bold italics'''''[[Verbatim(''''')]]; [[Verbatim('')]]''mixed ''[[Verbatim(''')]]'''''bold'''[[Verbatim(''')]] and italics''[[Verbatim('')]]; [[Verbatim(----)]] horizontal rule.
  Headings:: [[Verbatim(=)]] Title 1 [[Verbatim(=)]]; [[Verbatim(==)]] Title 2 [[Verbatim(==)]]; [[Verbatim(===)]] Title 3 [[Verbatim(===)]];   [[Verbatim(====)]] Title 4 [[Verbatim(====)]]; [[Verbatim(=====)]] Title 5 [[Verbatim(=====)]].
@@ -282,15 +282,15 @@
 Headings: Heading 1  Heading 2  Heading 3
           =========  ---------  ~~~~~~~~~
 
-Horizontal rule: ---- 
-Links: TrailingUnderscore_ `multi word with backticks`_ external_ 
+Horizontal rule: ----
+Links: TrailingUnderscore_ `multi word with backticks`_ external_
 
 .. _external: http://external-site.net/foo/
 
 Lists: * bullets; 1., a. numbered items.
 </pre>
 <br/>
-(!) For more help, see the 
+(!) For more help, see the
 <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">
 reStructuredText Quick Reference
 </a>.
@@ -347,7 +347,7 @@
 
     # some dangerous mimetypes (we don't use "content-disposition: inline" for them when a user
     # downloads such attachments, because the browser might execute e.g. Javascript contained
-    # in the HTML and steal your moin cookie or do other nasty stuff) 
+    # in the HTML and steal your moin cookie or do other nasty stuff)
     mimetypes_xss_protect = [
         'text/html',
         'application/x-shockwave-flash',
@@ -675,10 +675,10 @@
 
         # check if mail is possible and set flag:
         self.mail_enabled = (self.mail_smarthost is not None or self.mail_sendmail is not None) and self.mail_from
-        
+
         # check if jabber bot is available and set flag:
         self.jabber_enabled = self.notification_bot_uri is not None
-        
+
         # if we are to use the jabber bot, instantiate a server object for future use
         if self.jabber_enabled:
             from xmlrpclib import Server
@@ -741,7 +741,7 @@
 
     def _config_check(self):
         """ Check namespace and warn about unknown names
-        
+
         Warn about names which are not used by DefaultConfig, except
         modules, classes, _private or __magic__ names.
 
@@ -763,13 +763,13 @@
 
     def _decode(self):
         """ Try to decode certain names, ignore unicode values
-        
-        Try to decode str using utf-8. If the decode fail, raise FatalError. 
+
+        Try to decode str using utf-8. If the decode fail, raise FatalError.
 
         Certain config variables should contain unicode values, and
         should be defined with u'text' syntax. Python decode these if
         the file have a 'coding' line.
-        
+
         This will allow utf-8 users to use simple strings using, without
         using u'string'. Other users will have to use u'string' for
         these names, because we don't know what is the charset of the
@@ -865,7 +865,7 @@
                     plugin_parent_dir = os.path.abspath(os.path.join(self.plugin_dir, '..'))
                     fp, path, info = imp.find_module('plugin', [plugin_parent_dir])
                     try:
-                        # Load the module and set in sys.modules             
+                        # Load the module and set in sys.modules
                         module = imp.load_module(name, fp, path, info)
                         sys.modules[self.siteid].plugin = module
                     finally:
@@ -902,6 +902,6 @@
         """ Make it possible to access a config object like a dict """
         return getattr(self, item)
 
-# remove the gettext pseudo function 
+# remove the gettext pseudo function
 del _