changeset 1382:fe7123da78ba

pep8: fix some E701
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 10 Jun 2012 21:49:13 +0200
parents e3ea3f1901ba
children 452b341325eb
files MoinMoin/apps/admin/_tests/test_admin.py MoinMoin/converter/mediawiki_in.py MoinMoin/util/diff_text.py MoinMoin/util/iri.py MoinMoin/util/mime.py
diffstat 5 files changed, 34 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/admin/_tests/test_admin.py	Sun Jun 10 21:28:45 2012 +0200
+++ b/MoinMoin/apps/admin/_tests/test_admin.py	Sun Jun 10 21:49:13 2012 +0200
@@ -13,7 +13,8 @@
             rv = c.get(url)
             assert rv.status == status
             assert rv.headers['Content-Type'] == 'text/html; charset=utf-8'
-            for item in data: assert item in rv.data
+            for item in data:
+                assert item in rv.data
 
     def test_index(self):
         self._test_view_get(url_for('admin.index'))
--- a/MoinMoin/converter/mediawiki_in.py	Sun Jun 10 21:28:45 2012 +0200
+++ b/MoinMoin/converter/mediawiki_in.py	Sun Jun 10 21:49:13 2012 +0200
@@ -896,11 +896,14 @@
                         tag = match.group(1)
                         next_text = match.group(3)
                         text = match.group(2) or match.group(4)
-                        if not text: text = ''
+                        if not text:
+                            text = ''
                         tag_match = re.match(r"/\s*(.*)", tag)
                         status = not tag_match
-                        if tag_match: tag_name = tag_match.group(1).split(' ')[0]
-                        else: tag_name = tag.split(' ')[0]
+                        if tag_match:
+                            tag_name = tag_match.group(1).split(' ')[0]
+                        else:
+                            tag_name = tag.split(' ')[0]
                         if not tag_name in self.all_tags or re.match(r'.*/\s*$', tag)\
                                 or self.nowiki and (status or tag_name != self.nowiki_tag):
                             if not len(tags):
--- a/MoinMoin/util/diff_text.py	Sun Jun 10 21:28:45 2012 +0200
+++ b/MoinMoin/util/diff_text.py	Sun Jun 10 21:49:13 2012 +0200
@@ -32,7 +32,8 @@
         if l[0] != ' ':
             changed = 1
             break
-    if not changed: return []
+    if not changed:
+        return []
 
 #    if not "we want the unchanged lines, too":
 #        if "no questionmark lines":
@@ -64,8 +65,10 @@
             else:
                 count = 0
                 i += 1
-            if marker == '-': lcount_old = lcount_old + 1
-            else: lcount_new = lcount_new + 1
+            if marker == '-':
+                lcount_old = lcount_old + 1
+            else:
+                lcount_new = lcount_new + 1
         elif marker == '?':
             lines[i:i+1] = []
 
--- a/MoinMoin/util/iri.py	Sun Jun 10 21:28:45 2012 +0200
+++ b/MoinMoin/util/iri.py	Sun Jun 10 21:49:13 2012 +0200
@@ -146,11 +146,16 @@
             return unicode(self) == other
 
         if isinstance(other, Iri):
-            if self._scheme != other._scheme: return False
-            if self._authority != other._authority: return False
-            if self._path != other._path: return False
-            if self._query != other._query: return False
-            if self._fragment != other._fragment: return False
+            if self._scheme != other._scheme:
+                return False
+            if self._authority != other._authority:
+                return False
+            if self._path != other._path:
+                return False
+            if self._query != other._query:
+                return False
+            if self._fragment != other._fragment:
+                return False
             return True
 
         return NotImplemented
--- a/MoinMoin/util/mime.py	Sun Jun 10 21:28:45 2012 +0200
+++ b/MoinMoin/util/mime.py	Sun Jun 10 21:49:13 2012 +0200
@@ -49,9 +49,12 @@
             return self.__eq__(self.__class__(other))
 
         if isinstance(other, Type):
-            if self.type != other.type: return False
-            if self.subtype != other.subtype: return False
-            if self.parameters != other.parameters: return False
+            if self.type != other.type:
+                return False
+            if self.subtype != other.subtype:
+                return False
+            if self.parameters != other.parameters:
+                return False
             return True
 
         return NotImplemented
@@ -114,8 +117,10 @@
         - the other parameters are a supperset of this one.
         """
         if isinstance(other, Type):
-            if self.type and self.type != other.type: return False
-            if self.subtype and self.subtype != other.subtype: return False
+            if self.type and self.type != other.type:
+                return False
+            if self.subtype and self.subtype != other.subtype:
+                return False
             self_params = set(self.parameters.iteritems())
             other_params = set(other.parameters.iteritems())
             return self_params <= other_params