Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

break long lines (pep8)

ishirav4c38b28469c8
diff --git a/src/documents/models.py b/src/documents/models.py
index ee6ee8d31..8021e03c1 100644
--- a/src/documents/models.py
+++ b/src/documents/models.py
@@ -132,7 +132,8 @@ class MatchingModel(models.Model):
'''
findterms = re.compile(r'"([^"]+)"|(\S+)').findall
normspace = re.compile(r'\s+').sub
- return [normspace(r'\s+', (t[0] or t[1]).strip()) for t in findterms(self.match)]
+ return [normspace(r'\s+', (t[0] or t[1]).strip())
+ for t in findterms(self.match)]
def save(self, *args, **kwargs):
diff --git a/src/documents/tests/test_matchables.py b/src/documents/tests/test_matchables.py
index 6e64fc5bf..b1b8eb46f 100644
--- a/src/documents/tests/test_matchables.py
+++ b/src/documents/tests/test_matchables.py
@@ -16,9 +16,11 @@ class TestMatching(TestCase):
matching_algorithm=getattr(klass, algorithm)
)
for string in true:
- self.assertTrue(instance.matches(string), '"%s" should match "%s" but it does not' % (text, string))
+ self.assertTrue(instance.matches(string),
+ '"%s" should match "%s" but it does not' % (text, string))
for string in false:
- self.assertFalse(instance.matches(string), '"%s" should not match "%s" but it does' % (text, string))
+ self.assertFalse(instance.matches(string),
+ '"%s" should not match "%s" but it does' % (text, string))
def test_match_all(self):