changeset 178:d29abc5e4b4f

PEP8 fixes
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Wed, 16 Jul 2008 07:49:51 +0200
parents a399665b4cb9
children 00e363a155c4
files data/plugin/action/arnica_slides.py data/plugin/action/refresh.py data/plugin/parser/text_x_arnica.py
diffstat 3 files changed, 13 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/arnica_slides.py	Wed Jul 16 06:57:25 2008 +0200
+++ b/data/plugin/action/arnica_slides.py	Wed Jul 16 07:49:51 2008 +0200
@@ -13,7 +13,7 @@
 from MoinMoin import log
 logging = log.getLogger(__name__)
 
-from MoinMoin import  caching, config, wikiutil
+from MoinMoin import caching, config, wikiutil
 from MoinMoin.Page import Page
 from MoinMoin.action import ActionBase, AttachFile, cache
 from MoinMoin.formatter.text_html import Formatter
@@ -65,7 +65,7 @@
 var rotate_delay = 5; // delay in milliseconds (5000 = 5 secs)
 var current = %(counter)s;
 var theImages = new Array();
-var preloaded_images = new Array(); 
+var preloaded_images = new Array();
 var AttachFile_action = '?action=AttachFile&do=get&target=';
 
 function load_image(index) {
@@ -76,7 +76,7 @@
         preloaded_images[index] = true;
     }
 }
-      
+
 function arnica_preload() {
    var list = document.slideform.webnail_list.value;
    var value = list.split("|");
@@ -200,7 +200,7 @@
         url = cache.url(request, "")
     else:
         url = AttachFile.getAttachUrl(pagename, "", request)
-        
+
     link_to_image = AttachFile.getAttachUrl(pagename, original_images[idx], request)
 
     image_url = "%s%s" % (url, images[idx])
@@ -335,7 +335,7 @@
         target = request.form.get('target', [''])[0]
         images = request.form.get('images', [''])[0]
         original_images = request.form.get('original_images', [''])[0]
-        
+
         all_description = request.form.get('alias', [''])[0]
         all_exif_date = request.form.get('exif_date', [''])[0]
         image_for_webnail = (request.form.get("image_for_webnail", [0])[0])  == u'True'
@@ -348,10 +348,9 @@
 
         images = unpackLine(images)
         images = (images[1:])
-        
+
         original_images = unpackLine(original_images)
         original_images = (original_images[1:])
-        
 
         all_description = unpackLine(all_description)
         all_description = (all_description[1:])
--- a/data/plugin/action/refresh.py	Wed Jul 16 06:57:25 2008 +0200
+++ b/data/plugin/action/refresh.py	Wed Jul 16 07:49:51 2008 +0200
@@ -25,10 +25,10 @@
     caching.CacheEntry(request, arena, key, scope='item').remove()
     caching.CacheEntry(request, arena, "pagelinks", scope='item').remove()
 
-    # remove cache files from arnica 
-    path = caching.CacheEntry(request, cache.cache_arena, "", 
+    # remove cache files from arnica
+    path = caching.CacheEntry(request, cache.cache_arena, "",
                               cache.cache_scope, do_locking=False)._filename()
-    
+
     files = [fn.decode(config.charset) for fn in os.listdir(path)  if fn.endswith('data')]
     for file_name in files:
         key, ext = os.path.splitext(file_name)
--- a/data/plugin/parser/text_x_arnica.py	Wed Jul 16 06:57:25 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Wed Jul 16 07:49:51 2008 +0200
@@ -394,7 +394,7 @@
             self.description.append(ddict.get(attfile, attfile))
             self.high_resolution_image.append(attfile)
             fname, ext = os.path.splitext(attfile)
-            key = cache.key(self.request, itemname=self.pagename, attachname=attfile) 
+            key = cache.key(self.request, itemname=self.pagename, attachname=attfile)
             webnail = 'W' + key + ext
             thumbfile = 'T' + key + ext
             if ext in ('.gif', '.png'):
@@ -508,11 +508,11 @@
         cache_web = caching.CacheEntry(self.request, cache.cache_arena, webnail+'.data',
                                         cache.cache_scope, do_locking=False)
         webnail_image_filename = cache_web._filename()
-        
+
         cache_thumb = caching.CacheEntry(self.request, cache.cache_arena, thumbnail+'.data',
                                         cache.cache_scope, do_locking=False)
         thumbnail_image_filename = cache_thumb._filename()
-        
+
         if self.renew:
             cache_web.remove()
             cache_thumb.remove()
@@ -621,7 +621,7 @@
                 text = self.formatter.text(_("""You can't use as album image: \
                          "%(album_image)s" because it does not exists or it is not listed \
                          in your item list!""") % {"album_image": album_image, })
-                         
+
             result.append(''.join(text))
 
         # adds the last row if it is not filled up