changeset 2492:f1d470ade3c0

PEP8 fixes
author sharky93 <rishabhr123@gmail.com>
date Sun, 15 Sep 2013 23:34:05 +0530
parents 8f054781b48a
children d05386e32cf0
files MoinMoin/themes/__init__.py
diffstat 1 files changed, 31 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Sun Sep 15 23:21:51 2013 +0530
+++ b/MoinMoin/themes/__init__.py	Sun Sep 15 23:34:05 2013 +0530
@@ -85,11 +85,10 @@
             return []
 
         exists = flaskg.storage.has_item(item_name)
-            
+
         navtabs_endpoints = ['frontend.show_item', 'frontend.history',
-                            'frontend.show_item_meta', 'frontend.highlight_item', 'frontend.backrefs',
-                            'frontend.index', 'frontend.sitemap','frontend.similar_names',
-                            ]
+                             'frontend.show_item_meta', 'frontend.highlight_item', 'frontend.backrefs',
+                             'frontend.index', 'frontend.sitemap', 'frontend.similar_names', ]
 
         if self.user.may.write(item_name):
             navtabs_endpoints.append('frontend.modify_item')
@@ -97,7 +96,7 @@
         icon = self.get_endpoint_iconmap()
 
         navtabs = []
-        spl_active = [('frontend.history', 'frontend.diff'),]
+        spl_active = [('frontend.history', 'frontend.diff'), ]
 
         for endpoint, label, title, check_exists in app.cfg.item_views:
             if endpoint not in app.cfg.endpoints_excluded:
@@ -106,7 +105,7 @@
 
                         iconcls = icon[endpoint]
                         linkcls = None
-                        
+
                         if endpoint == 'special.comments':
                             maincls = "moin-toggle-comments-button"
                             href = "#"
@@ -138,8 +137,8 @@
         user_actions_endpoints = ['frontend.quicklink_item', 'frontend.subscribe_item', ]
         item_navigation_endpoints = ['special.supplementation']
         item_actions_endpoints = ['frontend.rename_item', 'frontend.delete_item', 'frontend.destroy_item',
-                'frontend.download_item', 
-                'frontend.copy_item',] if self.user.may.write(item_name) else []
+                                  'frontend.download_item',
+                                  'frontend.copy_item', ] if self.user.may.write(item_name) else []
 
         user_actions = []
         item_navigation = []
@@ -177,7 +176,7 @@
                     elif endpoint in item_navigation_endpoints:
 
                         iconcls = icon[endpoint]
-                        
+
                         if endpoint == 'special.supplementation':
                             for sub_item_name in app.cfg.supplementation_item_names:
                                 current_sub = item_name.rsplit('/', 1)[-1]
@@ -191,32 +190,32 @@
 
                                         item_navigation.append((endpoint, href, iconcls, label, title, subitem_exists))
                         else:
-                            href = url_for(endpoint, item_name=item_name)   
+                            href = url_for(endpoint, item_name=item_name)
                             item_navigation.append((endpoint, href, iconcls, label, title, True))
 
         return user_actions, item_navigation, item_actions
 
     def get_endpoint_iconmap(self):
-        icon = {'frontend.quicklink_item' : "icon-star-empty",
-               'frontend.subscribe_item' : "icon-envelope",
-               'frontend.index' : "icon-list-alt",
-               'frontend.sitemap' : "icon-sitemap",
-               'frontend.rename_item' : "icon-tag",
-               'frontend.delete_item' : "icon-trash",
-               'frontend.destroy_item' : "icon-fire",
-               'frontend.similar_names' : "icon-search",
-               'frontend.download_item' : "icon-download-alt",
-               'frontend.copy_item' : "icon-comment",
-               'special.supplementation' : "icon-comments",
-               'frontend.show_item' : "icon-eye-open",
-               'frontend.modify_item' : "icon-pencil",
-               'frontend.history' : "icon-time",
-               'frontend.show_item_meta' : "icon-wrench",
-               'frontend.highlight_item' : "icon-code",
-               'frontend.backrefs' : "icon-share",
-               'special.comments' : "icon-comment",
-               'special.transclusions' : "icon-edit",};
-        return icon        
+        icon = {'frontend.quicklink_item': "icon-star-empty",
+                'frontend.subscribe_item': "icon-envelope",
+                'frontend.index': "icon-list-alt",
+                'frontend.sitemap': "icon-sitemap",
+                'frontend.rename_item': "icon-tag",
+                'frontend.delete_item': "icon-trash",
+                'frontend.destroy_item': "icon-fire",
+                'frontend.similar_names': "icon-search",
+                'frontend.download_item': "icon-download-alt",
+                'frontend.copy_item': "icon-comment",
+                'special.supplementation': "icon-comments",
+                'frontend.show_item': "icon-eye-open",
+                'frontend.modify_item': "icon-pencil",
+                'frontend.history': "icon-time",
+                'frontend.show_item_meta': "icon-wrench",
+                'frontend.highlight_item': "icon-code",
+                'frontend.backrefs': "icon-share",
+                'special.comments': "icon-comment",
+                'special.transclusions': "icon-edit", }
+        return icon
 
     def location_breadcrumbs(self, item_name):
         """
@@ -498,6 +497,7 @@
     'text/x.moin.wiki': 'MoinWiki',
 }
 
+
 # TODO: Update dictionary with more content-types
 def shorten_content_type(contenttype):
     """
@@ -515,6 +515,7 @@
     else:
         return "Unknown"
 
+
 def shorten_id(name, length=7):
     """
     Shorten IDs to specified length