mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #21287 -- Fixed E123 pep8 warnings
This commit is contained in:
parent
65750b8352
commit
a800036981
71 changed files with 152 additions and 152 deletions
|
@ -81,7 +81,7 @@ def simple_unlimited_args_kwargs(one, two='hi', *args, **kwargs):
|
|||
return "simple_unlimited_args_kwargs - Expected result: %s / %s" % (
|
||||
', '.join(six.text_type(arg) for arg in [one, two] + list(args)),
|
||||
', '.join('%s=%s' % (k, v) for (k, v) in sorted_kwarg)
|
||||
)
|
||||
)
|
||||
simple_unlimited_args_kwargs.anything = "Expected simple_unlimited_args_kwargs __dict__"
|
||||
|
||||
@register.simple_tag(takes_context=True)
|
||||
|
@ -232,7 +232,7 @@ def inclusion_unlimited_args_kwargs(one, two='hi', *args, **kwargs):
|
|||
return {"result": "inclusion_unlimited_args_kwargs - Expected result: %s / %s" % (
|
||||
', '.join(six.text_type(arg) for arg in [one, two] + list(args)),
|
||||
', '.join('%s=%s' % (k, v) for (k, v) in sorted_kwarg)
|
||||
)}
|
||||
)}
|
||||
inclusion_unlimited_args_kwargs.anything = "Expected inclusion_unlimited_args_kwargs __dict__"
|
||||
|
||||
@register.inclusion_tag('inclusion.html', takes_context=True)
|
||||
|
@ -303,7 +303,7 @@ def assignment_unlimited_args_kwargs(one, two='hi', *args, **kwargs):
|
|||
return "assignment_unlimited_args_kwargs - Expected result: %s / %s" % (
|
||||
', '.join(six.text_type(arg) for arg in [one, two] + list(args)),
|
||||
', '.join('%s=%s' % (k, v) for (k, v) in sorted_kwarg)
|
||||
)
|
||||
)
|
||||
assignment_unlimited_args_kwargs.anything = "Expected assignment_unlimited_args_kwargs __dict__"
|
||||
|
||||
@register.assignment_tag(takes_context=True)
|
||||
|
|
|
@ -112,7 +112,7 @@ class CachedLoader(unittest.TestCase):
|
|||
settings.TEMPLATE_LOADERS = (
|
||||
('django.template.loaders.cached.Loader', (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
)
|
||||
)
|
||||
),
|
||||
)
|
||||
def tearDown(self):
|
||||
|
|
|
@ -123,7 +123,7 @@ class ParserTests(TestCase):
|
|||
'1|two_arguments',
|
||||
'1|two_arguments:"1"',
|
||||
'1|two_one_opt_arg',
|
||||
):
|
||||
):
|
||||
with self.assertRaises(TemplateSyntaxError):
|
||||
FilterExpression(expr, p)
|
||||
for expr in (
|
||||
|
@ -135,5 +135,5 @@ class ParserTests(TestCase):
|
|||
'1|one_opt_argument:"1"',
|
||||
# Not supplying all
|
||||
'1|two_one_opt_arg:"1"',
|
||||
):
|
||||
):
|
||||
FilterExpression(expr, p)
|
||||
|
|
|
@ -152,7 +152,7 @@ class SimpleTemplateResponseTest(TestCase):
|
|||
response = SimpleTemplateResponse('first/test.html', {
|
||||
'value': 123,
|
||||
'fn': datetime.now,
|
||||
})
|
||||
})
|
||||
self.assertRaises(ContentNotRenderedError,
|
||||
pickle.dumps, response)
|
||||
|
||||
|
@ -180,7 +180,7 @@ class SimpleTemplateResponseTest(TestCase):
|
|||
response = SimpleTemplateResponse('first/test.html', {
|
||||
'value': 123,
|
||||
'fn': datetime.now,
|
||||
})
|
||||
})
|
||||
self.assertRaises(ContentNotRenderedError,
|
||||
pickle.dumps, response)
|
||||
|
||||
|
@ -193,7 +193,7 @@ class SimpleTemplateResponseTest(TestCase):
|
|||
response = SimpleTemplateResponse('first/test.html', {
|
||||
'value': 123,
|
||||
'fn': datetime.now,
|
||||
})
|
||||
})
|
||||
|
||||
response.cookies['key'] = 'value'
|
||||
|
||||
|
@ -286,7 +286,7 @@ class TemplateResponseTest(TestCase):
|
|||
response = SimpleTemplateResponse('first/test.html', {
|
||||
'value': 123,
|
||||
'fn': datetime.now,
|
||||
})
|
||||
})
|
||||
self.assertRaises(ContentNotRenderedError,
|
||||
pickle.dumps, response)
|
||||
|
||||
|
|
|
@ -573,7 +573,7 @@ class TemplateTests(TransRealMixin, TestCase):
|
|||
('', False, normal_string_result),
|
||||
(expected_invalid_str, False, invalid_string_result),
|
||||
('', True, template_debug_result)
|
||||
]:
|
||||
]:
|
||||
settings.TEMPLATE_STRING_IF_INVALID = invalid_str
|
||||
settings.TEMPLATE_DEBUG = template_debug
|
||||
for is_cached in (False, True):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue