changeset 2279:49bc6f85f918

Fixed pep8 errors.
author Ashutosh Singla <ashu1461@gmail.com>
date Mon, 16 Sep 2013 00:33:17 +0530
parents 79dd0e5754a9
children 5cee54021c88
files MoinMoin/_tests/test_forms.py MoinMoin/apps/admin/views.py MoinMoin/items/__init__.py MoinMoin/storage/middleware/_tests/test_indexing.py MoinMoin/themes/__init__.py MoinMoin/util/interwiki.py
diffstat 6 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_forms.py	Mon Sep 16 00:19:20 2013 +0530
+++ b/MoinMoin/_tests/test_forms.py	Mon Sep 16 00:33:17 2013 +0530
@@ -71,7 +71,7 @@
              ([u'existingname'], 'ns1/ns2', '', 'existingname', False),
              ]
     for name, namespace, field, value, result in tests:
-        meta = {NAME:name, NAMESPACE: namespace}
+        meta = {NAME: name, NAMESPACE: namespace}
         x = JSON(json.dumps(meta))
         y = Names(name)
         state = dict(fqname=CompositeName(namespace, field, value), itemid=None, meta=meta)
--- a/MoinMoin/apps/admin/views.py	Mon Sep 16 00:19:20 2013 +0530
+++ b/MoinMoin/apps/admin/views.py	Mon Sep 16 00:33:17 2013 +0530
@@ -244,7 +244,7 @@
     if not namespace == NAMESPACE_ALL:
         q = And([q, Term(NAMESPACE, namespace), ])
     trashedEntry = namedtuple('trashedEntry', 'fqname oldname revid mtime comment editor')
-    results = [] 
+    results = []
     for rev in flaskg.storage.search(q, limit=None):
         meta = rev.meta
         results.append(trashedEntry(rev.fqname, meta[NAME_OLD], meta[REVID], meta[MTIME], meta[COMMENT], get_editor_info(meta)))
--- a/MoinMoin/items/__init__.py	Mon Sep 16 00:19:20 2013 +0530
+++ b/MoinMoin/items/__init__.py	Mon Sep 16 00:33:17 2013 +0530
@@ -685,7 +685,7 @@
         fqname = self.fqname
         isglobalindex = not fqname.value or fqname.value == NAMESPACE_ALL
         query = Term(WIKINAME, app.cfg.interwikiname) & self.build_index_query(startswith, selected_groups, isglobalindex)
-        if not fqname.value.startswith(NAMESPACE_ALL+'/') and fqname.value != NAMESPACE_ALL:
+        if not fqname.value.startswith(NAMESPACE_ALL + '/') and fqname.value != NAMESPACE_ALL:
             query = Term(NAMESPACE, fqname.namespace) & query
         revs = flaskg.storage.search(query, sortedby=NAME_EXACT, limit=None)
         return self.make_flat_index(revs, isglobalindex)
--- a/MoinMoin/storage/middleware/_tests/test_indexing.py	Mon Sep 16 00:19:20 2013 +0530
+++ b/MoinMoin/storage/middleware/_tests/test_indexing.py	Mon Sep 16 00:33:17 2013 +0530
@@ -377,7 +377,7 @@
         item_name_u = u'%s/userprofile' % NAMESPACE_USERPROFILES
         fqname_u = split_fqname(item_name_u)
         item = self.imw.get_item(**fqname_u.query)
-        rev_u = item.store_revision(dict(name=[fqname_u.value,], namespace=fqname_u.namespace, contenttype=u'text/plain;charset=utf-8'),
+        rev_u = item.store_revision(dict(name=[fqname_u.value], namespace=fqname_u.namespace, contenttype=u'text/plain;charset=utf-8'),
                                     StringIO(str(item_name_u)), return_rev=True)
         item = self.imw[item_name_n]
         rev_n = item.get_revision(rev_n.revid)
--- a/MoinMoin/themes/__init__.py	Mon Sep 16 00:19:20 2013 +0530
+++ b/MoinMoin/themes/__init__.py	Mon Sep 16 00:33:17 2013 +0530
@@ -163,7 +163,7 @@
         else:
             # We cannot check if wiki pages exists in remote wikis
             exists = True
-        wiki_href = url_for_item(itemname, wiki_name=wikiname,namespace=NAMESPACE_USERPROFILES)
+        wiki_href = url_for_item(itemname, wiki_name=wikiname, namespace=NAMESPACE_USERPROFILES)
         return wiki_href, display_name, title, exists
 
     def split_navilink(self, text):
--- a/MoinMoin/util/interwiki.py	Mon Sep 16 00:19:20 2013 +0530
+++ b/MoinMoin/util/interwiki.py	Mon Sep 16 00:33:17 2013 +0530
@@ -171,7 +171,6 @@
         return CompositeName(self.namespace, NAME_EXACT, app.cfg.root_mapping.get(self.namespace, app.cfg.default_root))
 
 
-
 def split_fqname(url):
     """
     Split a fully qualified url into namespace, field and pagename
@@ -229,7 +228,7 @@
             interwiki_mapping.add(interwiki_name.split('/')[0])
         wikiname, item_name = _split_namespace(interwiki_mapping, wikiurl)
         if wikiname:
-            wikiurl = wikiurl[len(wikiname)+1:]
+            wikiurl = wikiurl[len(wikiname) + 1:]
         namespace, field, item_name = split_fqname(wikiurl)
         if not wikiname:
             wikiname = u'Self'