diff options
author | Stephen Finucane <stephen@that.guru> | 2018-10-26 10:34:34 +0100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2018-10-26 10:42:01 +0100 |
commit | ed2052cd7f4087774263159f85361c2e03b2c161 (patch) | |
tree | 1d872e12869b71a45770b356b24989fcf3d2268a | |
parent | 498a8eeaa6c9d1dca8ab29a845325cff1463e815 (diff) | |
download | patchwork-ed2052cd7f4087774263159f85361c2e03b2c161.tar patchwork-ed2052cd7f4087774263159f85361c2e03b2c161.tar.gz |
trivial: Use implicit string concatenation
While pycodestyle's W504 ("line break after binary operator") error was
recently disabled, it did highlight a number of areas where explicit
string concatenation was being used despite it not be necessary. Fix
these while we're aware of them.
[1] http://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
Signed-off-by: Stephen Finucane <stephen@that.guru>
-rw-r--r-- | patchwork/filters.py | 8 | ||||
-rw-r--r-- | patchwork/forms.py | 4 | ||||
-rw-r--r-- | patchwork/parser.py | 2 | ||||
-rw-r--r-- | patchwork/tests/test_updates.py | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/patchwork/filters.py b/patchwork/filters.py index 9900307..79aaea4 100644 --- a/patchwork/filters.py +++ b/patchwork/filters.py @@ -112,8 +112,8 @@ class SeriesFilter(Filter): @property def form(self): - return mark_safe(('<input type="text" name="series" ' + - 'id="series_input" class="form-control">')) + return mark_safe('<input type="text" name="series" ' + 'id="series_input" class="form-control">') class SubmitterFilter(Filter): @@ -178,8 +178,8 @@ class SubmitterFilter(Filter): @property def form(self): - return mark_safe(('<input type="text" name="submitter" ' + - 'id="submitter_input" class="form-control">')) + return mark_safe('<input type="text" name="submitter" ' + 'id="submitter_input" class="form-control">') class StateFilter(Filter): diff --git a/patchwork/forms.py b/patchwork/forms.py index f112dcc..5d4c920 100644 --- a/patchwork/forms.py +++ b/patchwork/forms.py @@ -29,7 +29,7 @@ class RegistrationForm(forms.Form): User.objects.get(username__iexact=value) except User.DoesNotExist: return self.cleaned_data['username'] - raise forms.ValidationError('This username is already taken. ' + + raise forms.ValidationError('This username is already taken. ' 'Please choose another.') def clean_email(self): @@ -38,7 +38,7 @@ class RegistrationForm(forms.Form): user = User.objects.get(email__iexact=value) except User.DoesNotExist: return self.cleaned_data['email'] - raise forms.ValidationError('This email address is already in use ' + + raise forms.ValidationError('This email address is already in use ' 'for the account "%s".\n' % user.username) def clean(self): diff --git a/patchwork/parser.py b/patchwork/parser.py index bc9dae2..6b7189c 100644 --- a/patchwork/parser.py +++ b/patchwork/parser.py @@ -867,7 +867,7 @@ def parse_patch(content): def parse_pull_request(content): - git_re = re.compile(r'^The following changes since commit.*' + + git_re = re.compile(r'^The following changes since commit.*' r'^are available in the git repository at:\n' r'^\s*([\S]+://[^\n]+)$', re.DOTALL | re.MULTILINE | re.IGNORECASE) diff --git a/patchwork/tests/test_updates.py b/patchwork/tests/test_updates.py index e136aee..a554e38 100644 --- a/patchwork/tests/test_updates.py +++ b/patchwork/tests/test_updates.py @@ -97,7 +97,7 @@ class MultipleUpdateTest(TestCase): new_states = [Patch.objects.get(pk=p.pk).state for p in self.patches] self.assertEqual(new_states, orig_states) self.assertFormError(response, 'patchform', 'state', - 'Select a valid choice. That choice is not one ' + + 'Select a valid choice. That choice is not one ' 'of the available choices.') def _test_delegate_change(self, delegate_str): |