changeset 512:31e327c450ca

PEP8 whitespace fix HG : Enter commit message. Lines beginning with 'HG:' are removed.
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 22 Mar 2010 00:38:06 +0100
parents ef1f74bf4776
children 438f1d16e63f 55ffbd41c42d 0d5369896835
files data/plugin/action/CheckTranslation.py data/plugin/action/SvgEditor.py data/plugin/action/arnica_slides.py data/plugin/macro/DictColumns.py data/plugin/macro/Image.py data/plugin/macro/_tests/test_DictColumns.py data/plugin/parser/text_x_mathtran.py
diffstat 7 files changed, 28 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/CheckTranslation.py	Fri Mar 19 22:59:00 2010 +0100
+++ b/data/plugin/action/CheckTranslation.py	Mon Mar 22 00:38:06 2010 +0100
@@ -145,7 +145,7 @@
             trans_status.append(info)
 
             if trans_page_name == orig_page_name and orig_page_name not in i18n.strings.admin_pages:
-                 trans_status.append(_(u'/!\\ Page is untranslated.', wiki=True))
+                trans_status.append(_(u'/!\\ Page is untranslated.', wiki=True))
 
             if trans_page_name != orig_page_name and trans_page.exists():
                 if trans_page.pi['language'] != lang:
--- a/data/plugin/action/SvgEditor.py	Fri Mar 19 22:59:00 2010 +0100
+++ b/data/plugin/action/SvgEditor.py	Mon Mar 22 00:38:06 2010 +0100
@@ -2,9 +2,9 @@
 """
     MoinMoin - SvgEditor
 
-    This action is used to call svg-edit, (http://code.google.com/p/svg-edit/) 
-    
-    svg-edit pre alpha 2.5 is called 
+    This action is used to call svg-edit, (http://code.google.com/p/svg-edit/)
+
+    svg-edit pre alpha 2.5 is called
     this action needs moin-1.9 and is currently a mockup for an implementation in moin-2.0
 
     @copyright: 2009-2010 by MoinMoin:ReimarBauer
@@ -33,7 +33,7 @@
         img = self.icon('attachimg')  # TODO: we need a new "drawimg" in similar grey style and size
         css = 'nonexistent'
 
-    # ToDo use EmbedObject here 
+    # ToDo use EmbedObject here
 
     kw['src'] = drawing + '.svg'
     return self.image(**kw)
@@ -96,7 +96,7 @@
 
         url = Page(request, pagename).url(request)
         request.http_redirect(url)
-            
+
     def render(self):
         _ = self._
         request = self.request
@@ -116,7 +116,7 @@
         request.theme.send_closing_html()
 
 def execute(pagename, request):
-    #ToDo refactoring to class 
+    #ToDo refactoring to class
 
     _ = request.getText
     msg = None
@@ -138,3 +138,4 @@
         return
 
     SvgEditor(request, pagename, target).render()
+
--- a/data/plugin/action/arnica_slides.py	Fri Mar 19 22:59:00 2010 +0100
+++ b/data/plugin/action/arnica_slides.py	Mon Mar 22 00:38:06 2010 +0100
@@ -28,8 +28,8 @@
 action_name = __name__.split('.')[-1]
 
 def ensureversion(version):
-    """ Ensures that the given version string is lower equal than the used MoinMoin release string. 
-     
+    """ Ensures that the given version string is lower equal than the used MoinMoin release string.
+
     @param version: required version of MoinMoin (e.g. "1.9.0")
     """
     from MoinMoin.version import release
@@ -38,7 +38,7 @@
     release = re.compile('\d+').findall(release)[0:3]
     release = [int(x) for x in release]
     return version_int <= release
-            
+
 def image_rotate(file_name, angle, img_type):
     """ rotates the image
     @param file_name: the name of the attachment
--- a/data/plugin/macro/DictColumns.py	Fri Mar 19 22:59:00 2010 +0100
+++ b/data/plugin/macro/DictColumns.py	Mon Mar 22 00:38:06 2010 +0100
@@ -91,7 +91,7 @@
     def get_dict(self, dict_source):
         """
         gets the dictionary dependent of the markup
-        @param dict_source: pagename to read dict data from 
+        @param dict_source: pagename to read dict data from
         """
         if self.markup == "definition list":
             return self.request.dicts[dict_source]
@@ -100,7 +100,7 @@
 
     def parse_title(self, dict_source):
         """
-        creates a dictionary based on page titles 
+        creates a dictionary based on page titles
         @param dict_source: pagename to read dict data from
         """
         body = Page(self.request, dict_source).get_raw_body()
--- a/data/plugin/macro/Image.py	Fri Mar 19 22:59:00 2010 +0100
+++ b/data/plugin/macro/Image.py	Mon Mar 22 00:38:06 2010 +0100
@@ -244,8 +244,8 @@
         image dimensions to not be larger than (width, height) and also not be larger than
         the original image. Thus, by not giving width or height, you'll get the original image,
         and if you specify width or height you will get an image of that width or that height.
-        
-        Optional you can set by the clear parameter how following text should be handled. 
+
+        Optional you can set by the clear parameter how following text should be handled.
 
         <<Image(PageName/attachname,width=100,alt="sample image")>>
     """
@@ -259,7 +259,7 @@
     div_width = ""
     br_clear = ""
     if clear != "none":
-       br_clear =  '<br style="clear:%s;">' % clear
+        br_clear = '<br style="clear:%s;">' % clear
     if width != 9999:
         div_width = '<div style="width:%spx">' % width
     return """<div class="thumbnail">%s<div class="decription">%s%s
--- a/data/plugin/macro/_tests/test_DictColumns.py	Fri Mar 19 22:59:00 2010 +0100
+++ b/data/plugin/macro/_tests/test_DictColumns.py	Mon Mar 22 00:38:06 2010 +0100
@@ -74,7 +74,7 @@
 """
     alias_text = " prize:: %(prize)s"
     alias_dict = {"prize": "prize (euro)"}
-    
+
     title_text = """\
 = book =
 book example
--- a/data/plugin/parser/text_x_mathtran.py	Fri Mar 19 22:59:00 2010 +0100
+++ b/data/plugin/parser/text_x_mathtran.py	Mon Mar 22 00:38:06 2010 +0100
@@ -1,16 +1,16 @@
 # -*- coding: iso-8859-1 -*-
 """
     MoinMoin - mathtran
-    
+
     This parser is used to visualize latex formulars using a mathtran server, e.g.
     http://www.mathtran.org
-    
-    Many thanks to Jonathan Fine for our discussions at the EuroPython Conference during 
+
+    Many thanks to Jonathan Fine for our discussions at the EuroPython Conference during
     the MoinMoin sprint session in Vilnius
-    
+
     Please honor this work by adding a credits entry to the mathtran project on your wiki.
     "<a href="http://www.mathtran.org/" title="MoinMoin uses the Mathtran Online translation of mathematical content software.">MathTran Powered</a>"
-            
+
     @copyright: 2008-2009 by MoinMoin:ReimarBauer
     @license: GNU GPL, see COPYING for details.
 """
@@ -23,7 +23,7 @@
 except ImportError:
     urllib = None
 
-def mathtran_settings(formular=u'', scale_factor=(u"3", u"1", u"2", u"4", u"5"), 
+def mathtran_settings(formular=u'', scale_factor=(u"3", u"1", u"2", u"4", u"5"),
                       mathtran_server=u"http://www.mathtran.org/cgi-bin/toy/"):
     """ dummy function to initialize all default parameters for mathtran. The parameters are checked for wrong input.
     @param formular: latex formular
@@ -66,17 +66,17 @@
             return
 
         text = """%(mathtran_server)s?;D=%(scale_factor)s;tex=%(formular)s""" % {
-                                                                                 "mathtran_server": self.mathtran_server, 
-                                                                                 "formular": wikiutil.url_quote(self.raw), 
+                                                                                 "mathtran_server": self.mathtran_server,
+                                                                                 "formular": wikiutil.url_quote(self.raw),
                                                                                  "scale_factor": self.scale_factor,
                                                                                 }
         key = cache.key(self.request, itemname=self.pagename, content=text)
         if not cache.exists(self.request, key) and urllib:
-            # ToDo add a timeout 
+            # ToDo add a timeout
             image = urllib.urlopen(text)
             cache.put(self.request, key, image.read(),
                       content_type="image/png")
-        if cache.exists(self.request, key):    
+        if cache.exists(self.request, key):
             credits = """<a href="http://www.mathtran.org/" title="MoinMoin uses the Mathtran Online translation of mathematical content software.">MathTran Powered</a>"""
             if not credits in self.request.cfg.page_credits:
                 self.request.cfg.page_credits.append(credits)
@@ -90,3 +90,4 @@
             self.request.write(self.formatter.div(1, css_class="mathtran"))
             self.request.write(self.render(formatter))
             self.request.write(self.formatter.div(0))
+