From 4c38b28469c8f6185459dc5c588464e877b7c77a Mon Sep 17 00:00:00 2001 From: ishirav Date: Sat, 23 Dec 2017 06:59:48 +0200 Subject: [PATCH] break long lines (pep8) --- src/documents/models.py | 3 ++- src/documents/tests/test_matchables.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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):