From: Stephen Finucane Date: Tue, 19 Jul 2022 15:07:38 +0000 (+0100) Subject: trivial: Remove unnecessary whitespace X-Git-Tag: v3.2.0~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdb0d1f4e2ce436da5f602533b0ae26d2f812313;p=thirdparty%2Fpatchwork.git trivial: Remove unnecessary whitespace This was added when we ran black over the codebase. Signed-off-by: Stephen Finucane --- diff --git a/patchwork/api/patch.py b/patchwork/api/patch.py index 34067611..a08c1261 100644 --- a/patchwork/api/patch.py +++ b/patchwork/api/patch.py @@ -42,10 +42,10 @@ class StateField(RelatedField): default_error_messages = { 'required': _('This field is required.'), 'invalid_choice': _( - 'Invalid state {name}. Expected one of: ' '{choices}.' + 'Invalid state {name}. Expected one of: {choices}.' ), 'incorrect_type': _( - 'Incorrect type. Expected string value, received ' '{data_type}.' + 'Incorrect type. Expected string value, received {data_type}.' ), } diff --git a/patchwork/forms.py b/patchwork/forms.py index 1c5a29be..a60578be 100644 --- a/patchwork/forms.py +++ b/patchwork/forms.py @@ -40,7 +40,7 @@ class RegistrationForm(forms.Form): except User.DoesNotExist: return self.cleaned_data['username'] raise forms.ValidationError( - 'This username is already taken. ' 'Please choose another.' + 'This username is already taken. Please choose another.' ) def clean_email(self): diff --git a/patchwork/tests/test_parser.py b/patchwork/tests/test_parser.py index b731fe78..1278137b 100644 --- a/patchwork/tests/test_parser.py +++ b/patchwork/tests/test_parser.py @@ -325,7 +325,7 @@ class SenderCorrelationTest(TestCase): if x_original_from: mail += 'X-Original-From: %s\n' % x_original_from - mail += 'Subject: Tests\n\n' 'test\n' + mail += 'Subject: Tests\n\ntest\n' return message_from_string(mail) diff --git a/patchwork/tests/test_xmlrpc.py b/patchwork/tests/test_xmlrpc.py index 61275219..dad2107b 100644 --- a/patchwork/tests/test_xmlrpc.py +++ b/patchwork/tests/test_xmlrpc.py @@ -20,7 +20,7 @@ class ServerProxy(xmlrpc_client.ServerProxy): @unittest.skipUnless( settings.ENABLE_XMLRPC, - 'requires xmlrpc interface (use the ENABLE_XMLRPC ' 'setting)', + 'requires xmlrpc interface (use the ENABLE_XMLRPC setting)', ) class XMLRPCTest(LiveServerTestCase): def setUp(self): @@ -51,7 +51,7 @@ class XMLRPCGenericTest(XMLRPCTest): @unittest.skipUnless( settings.ENABLE_XMLRPC, - 'requires xmlrpc interface (use the ENABLE_XMLRPC ' 'setting)', + 'requires xmlrpc interface (use the ENABLE_XMLRPC setting)', ) class XMLRPCAuthenticatedTest(LiveServerTestCase): def setUp(self): diff --git a/patchwork/tests/views/test_about.py b/patchwork/tests/views/test_about.py index e6b0a8fd..56605631 100644 --- a/patchwork/tests/views/test_about.py +++ b/patchwork/tests/views/test_about.py @@ -24,7 +24,7 @@ class AboutViewTest(TestCase): @unittest.skipUnless( settings.ENABLE_XMLRPC, - 'requires xmlrpc interface (use the ENABLE_XMLRPC ' 'setting)', + 'requires xmlrpc interface (use the ENABLE_XMLRPC setting)', ) def test_redirects_xmlrpc(self): self._test_redirect('help-pwclient') diff --git a/patchwork/tests/views/test_bundles.py b/patchwork/tests/views/test_bundles.py index b730bdf3..57340fa4 100644 --- a/patchwork/tests/views/test_bundles.py +++ b/patchwork/tests/views/test_bundles.py @@ -826,7 +826,7 @@ class BundleReorderTest(BundleTestBase): @unittest.skipUnless( settings.COMPAT_REDIR, - 'requires compat redirection (use the COMPAT_REDIR ' 'setting)', + 'requires compat redirection (use the COMPAT_REDIR setting)', ) class BundleRedirTest(BundleTestBase): """Validate redirection of legacy URLs.""" diff --git a/patchwork/tests/views/test_patch.py b/patchwork/tests/views/test_patch.py index 70a2c836..682978c5 100644 --- a/patchwork/tests/views/test_patch.py +++ b/patchwork/tests/views/test_patch.py @@ -145,7 +145,7 @@ class PatchListOrderingTest(TestCase): # [2] https://michaelsoolee.com/case-insensitive-sorting-sqlite/ @unittest.skipIf( 'sqlite3' in settings.DATABASES['default']['ENGINE'], - 'The sqlite3 backend does not support case insensitive ' 'ordering', + 'The sqlite3 backend does not support case insensitive ordering', ) def test_submitter_order(self): url = reverse( @@ -162,7 +162,7 @@ class PatchListOrderingTest(TestCase): @unittest.skipIf( 'sqlite3' in settings.DATABASES['default']['ENGINE'], - 'The sqlite3 backend does not support case insensitive ' 'ordering', + 'The sqlite3 backend does not support case insensitive ordering', ) def test_submitter_reverse_order(self): url = reverse( diff --git a/patchwork/views/mail.py b/patchwork/views/mail.py index 8b31fc9e..8bc3af24 100644 --- a/patchwork/views/mail.py +++ b/patchwork/views/mail.py @@ -78,9 +78,9 @@ def _optinout(request, action): form = EmailForm(data=request.POST) if not form.is_valid(): - context['error'] = ( - 'There was an error in the form. Please review ' 'and re-submit.' - ) + context[ + 'error' + ] = 'There was an error in the form. Please review and re-submit.' context['form'] = form return render(request, html_template, context)