This was added when we ran black over the codebase.
Signed-off-by: Stephen Finucane <stephen@that.guru>
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}.'
),
}
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):
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)
@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):
@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):
@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')
@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."""
# [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(
@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(
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)