Commits

Ashutosh Singla committed 49bc6f8

Fixed pep8 errors.

Comments (0)

Files changed (6)

MoinMoin/_tests/test_forms.py

              ([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)

MoinMoin/apps/admin/views.py

     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)))

MoinMoin/items/__init__.py

         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)

MoinMoin/storage/middleware/_tests/test_indexing.py

         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)

MoinMoin/themes/__init__.py

         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):

MoinMoin/util/interwiki.py

         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
             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'