mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed E305 flake8 warnings.
This commit is contained in:
parent
6072de727f
commit
967be82443
114 changed files with 360 additions and 0 deletions
|
@ -32,6 +32,8 @@ def context_stack_length(context):
|
|||
def no_params():
|
||||
"""Expected no_params __doc__"""
|
||||
return "no_params - Expected result"
|
||||
|
||||
|
||||
no_params.anything = "Expected no_params __dict__"
|
||||
|
||||
|
||||
|
@ -39,6 +41,8 @@ no_params.anything = "Expected no_params __dict__"
|
|||
def one_param(arg):
|
||||
"""Expected one_param __doc__"""
|
||||
return "one_param - Expected result: %s" % arg
|
||||
|
||||
|
||||
one_param.anything = "Expected one_param __dict__"
|
||||
|
||||
|
||||
|
@ -46,6 +50,8 @@ one_param.anything = "Expected one_param __dict__"
|
|||
def explicit_no_context(arg):
|
||||
"""Expected explicit_no_context __doc__"""
|
||||
return "explicit_no_context - Expected result: %s" % arg
|
||||
|
||||
|
||||
explicit_no_context.anything = "Expected explicit_no_context __dict__"
|
||||
|
||||
|
||||
|
@ -53,6 +59,8 @@ explicit_no_context.anything = "Expected explicit_no_context __dict__"
|
|||
def no_params_with_context(context):
|
||||
"""Expected no_params_with_context __doc__"""
|
||||
return "no_params_with_context - Expected result (context value: %s)" % context['value']
|
||||
|
||||
|
||||
no_params_with_context.anything = "Expected no_params_with_context __dict__"
|
||||
|
||||
|
||||
|
@ -60,6 +68,8 @@ no_params_with_context.anything = "Expected no_params_with_context __dict__"
|
|||
def params_and_context(context, arg):
|
||||
"""Expected params_and_context __doc__"""
|
||||
return "params_and_context - Expected result (context value: %s): %s" % (context['value'], arg)
|
||||
|
||||
|
||||
params_and_context.anything = "Expected params_and_context __dict__"
|
||||
|
||||
|
||||
|
@ -67,6 +77,8 @@ params_and_context.anything = "Expected params_and_context __dict__"
|
|||
def simple_two_params(one, two):
|
||||
"""Expected simple_two_params __doc__"""
|
||||
return "simple_two_params - Expected result: %s, %s" % (one, two)
|
||||
|
||||
|
||||
simple_two_params.anything = "Expected simple_two_params __dict__"
|
||||
|
||||
|
||||
|
@ -74,6 +86,8 @@ simple_two_params.anything = "Expected simple_two_params __dict__"
|
|||
def simple_one_default(one, two='hi'):
|
||||
"""Expected simple_one_default __doc__"""
|
||||
return "simple_one_default - Expected result: %s, %s" % (one, two)
|
||||
|
||||
|
||||
simple_one_default.anything = "Expected simple_one_default __dict__"
|
||||
|
||||
|
||||
|
@ -83,6 +97,8 @@ def simple_unlimited_args(one, two='hi', *args):
|
|||
return "simple_unlimited_args - Expected result: %s" % (
|
||||
', '.join(six.text_type(arg) for arg in [one, two] + list(args))
|
||||
)
|
||||
|
||||
|
||||
simple_unlimited_args.anything = "Expected simple_unlimited_args __dict__"
|
||||
|
||||
|
||||
|
@ -90,6 +106,8 @@ simple_unlimited_args.anything = "Expected simple_unlimited_args __dict__"
|
|||
def simple_only_unlimited_args(*args):
|
||||
"""Expected simple_only_unlimited_args __doc__"""
|
||||
return "simple_only_unlimited_args - Expected result: %s" % ', '.join(six.text_type(arg) for arg in args)
|
||||
|
||||
|
||||
simple_only_unlimited_args.anything = "Expected simple_only_unlimited_args __dict__"
|
||||
|
||||
|
||||
|
@ -102,6 +120,8 @@ def simple_unlimited_args_kwargs(one, two='hi', *args, **kwargs):
|
|||
', '.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__"
|
||||
|
||||
|
||||
|
@ -109,6 +129,8 @@ simple_unlimited_args_kwargs.anything = "Expected simple_unlimited_args_kwargs _
|
|||
def simple_tag_without_context_parameter(arg):
|
||||
"""Expected simple_tag_without_context_parameter __doc__"""
|
||||
return "Expected result"
|
||||
|
||||
|
||||
simple_tag_without_context_parameter.anything = "Expected simple_tag_without_context_parameter __dict__"
|
||||
|
||||
|
||||
|
@ -144,6 +166,7 @@ def use_l10n(context):
|
|||
def minustwo_overridden_name(value):
|
||||
return value - 2
|
||||
|
||||
|
||||
register.simple_tag(lambda x: x - 1, name='minusone')
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ register = Library()
|
|||
def inclusion_no_params():
|
||||
"""Expected inclusion_no_params __doc__"""
|
||||
return {"result": "inclusion_no_params - Expected result"}
|
||||
|
||||
|
||||
inclusion_no_params.anything = "Expected inclusion_no_params __dict__"
|
||||
|
||||
|
||||
|
@ -18,6 +20,8 @@ inclusion_no_params.anything = "Expected inclusion_no_params __dict__"
|
|||
def inclusion_no_params_from_template():
|
||||
"""Expected inclusion_no_params_from_template __doc__"""
|
||||
return {"result": "inclusion_no_params_from_template - Expected result"}
|
||||
|
||||
|
||||
inclusion_no_params_from_template.anything = "Expected inclusion_no_params_from_template __dict__"
|
||||
|
||||
|
||||
|
@ -25,6 +29,8 @@ inclusion_no_params_from_template.anything = "Expected inclusion_no_params_from_
|
|||
def inclusion_one_param(arg):
|
||||
"""Expected inclusion_one_param __doc__"""
|
||||
return {"result": "inclusion_one_param - Expected result: %s" % arg}
|
||||
|
||||
|
||||
inclusion_one_param.anything = "Expected inclusion_one_param __dict__"
|
||||
|
||||
|
||||
|
@ -32,6 +38,8 @@ inclusion_one_param.anything = "Expected inclusion_one_param __dict__"
|
|||
def inclusion_one_param_from_template(arg):
|
||||
"""Expected inclusion_one_param_from_template __doc__"""
|
||||
return {"result": "inclusion_one_param_from_template - Expected result: %s" % arg}
|
||||
|
||||
|
||||
inclusion_one_param_from_template.anything = "Expected inclusion_one_param_from_template __dict__"
|
||||
|
||||
|
||||
|
@ -39,6 +47,8 @@ inclusion_one_param_from_template.anything = "Expected inclusion_one_param_from_
|
|||
def inclusion_explicit_no_context(arg):
|
||||
"""Expected inclusion_explicit_no_context __doc__"""
|
||||
return {"result": "inclusion_explicit_no_context - Expected result: %s" % arg}
|
||||
|
||||
|
||||
inclusion_explicit_no_context.anything = "Expected inclusion_explicit_no_context __dict__"
|
||||
|
||||
|
||||
|
@ -46,6 +56,8 @@ inclusion_explicit_no_context.anything = "Expected inclusion_explicit_no_context
|
|||
def inclusion_explicit_no_context_from_template(arg):
|
||||
"""Expected inclusion_explicit_no_context_from_template __doc__"""
|
||||
return {"result": "inclusion_explicit_no_context_from_template - Expected result: %s" % arg}
|
||||
|
||||
|
||||
inclusion_explicit_no_context_from_template.anything = "Expected inclusion_explicit_no_context_from_template __dict__"
|
||||
|
||||
|
||||
|
@ -53,6 +65,8 @@ inclusion_explicit_no_context_from_template.anything = "Expected inclusion_expli
|
|||
def inclusion_no_params_with_context(context):
|
||||
"""Expected inclusion_no_params_with_context __doc__"""
|
||||
return {"result": "inclusion_no_params_with_context - Expected result (context value: %s)" % context['value']}
|
||||
|
||||
|
||||
inclusion_no_params_with_context.anything = "Expected inclusion_no_params_with_context __dict__"
|
||||
|
||||
|
||||
|
@ -64,6 +78,8 @@ def inclusion_no_params_with_context_from_template(context):
|
|||
"inclusion_no_params_with_context_from_template - Expected result (context value: %s)" % context['value']
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
inclusion_no_params_with_context_from_template.anything = (
|
||||
"Expected inclusion_no_params_with_context_from_template __dict__"
|
||||
)
|
||||
|
@ -75,6 +91,8 @@ def inclusion_params_and_context(context, arg):
|
|||
return {
|
||||
"result": "inclusion_params_and_context - Expected result (context value: %s): %s" % (context['value'], arg)
|
||||
}
|
||||
|
||||
|
||||
inclusion_params_and_context.anything = "Expected inclusion_params_and_context __dict__"
|
||||
|
||||
|
||||
|
@ -87,6 +105,8 @@ def inclusion_params_and_context_from_template(context, arg):
|
|||
"(context value: %s): %s" % (context['value'], arg)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
inclusion_params_and_context_from_template.anything = "Expected inclusion_params_and_context_from_template __dict__"
|
||||
|
||||
|
||||
|
@ -94,6 +114,8 @@ inclusion_params_and_context_from_template.anything = "Expected inclusion_params
|
|||
def inclusion_two_params(one, two):
|
||||
"""Expected inclusion_two_params __doc__"""
|
||||
return {"result": "inclusion_two_params - Expected result: %s, %s" % (one, two)}
|
||||
|
||||
|
||||
inclusion_two_params.anything = "Expected inclusion_two_params __dict__"
|
||||
|
||||
|
||||
|
@ -101,6 +123,8 @@ inclusion_two_params.anything = "Expected inclusion_two_params __dict__"
|
|||
def inclusion_two_params_from_template(one, two):
|
||||
"""Expected inclusion_two_params_from_template __doc__"""
|
||||
return {"result": "inclusion_two_params_from_template - Expected result: %s, %s" % (one, two)}
|
||||
|
||||
|
||||
inclusion_two_params_from_template.anything = "Expected inclusion_two_params_from_template __dict__"
|
||||
|
||||
|
||||
|
@ -108,6 +132,8 @@ inclusion_two_params_from_template.anything = "Expected inclusion_two_params_fro
|
|||
def inclusion_one_default(one, two='hi'):
|
||||
"""Expected inclusion_one_default __doc__"""
|
||||
return {"result": "inclusion_one_default - Expected result: %s, %s" % (one, two)}
|
||||
|
||||
|
||||
inclusion_one_default.anything = "Expected inclusion_one_default __dict__"
|
||||
|
||||
|
||||
|
@ -115,6 +141,8 @@ inclusion_one_default.anything = "Expected inclusion_one_default __dict__"
|
|||
def inclusion_one_default_from_template(one, two='hi'):
|
||||
"""Expected inclusion_one_default_from_template __doc__"""
|
||||
return {"result": "inclusion_one_default_from_template - Expected result: %s, %s" % (one, two)}
|
||||
|
||||
|
||||
inclusion_one_default_from_template.anything = "Expected inclusion_one_default_from_template __dict__"
|
||||
|
||||
|
||||
|
@ -128,6 +156,8 @@ def inclusion_unlimited_args(one, two='hi', *args):
|
|||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
inclusion_unlimited_args.anything = "Expected inclusion_unlimited_args __dict__"
|
||||
|
||||
|
||||
|
@ -141,6 +171,8 @@ def inclusion_unlimited_args_from_template(one, two='hi', *args):
|
|||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
inclusion_unlimited_args_from_template.anything = "Expected inclusion_unlimited_args_from_template __dict__"
|
||||
|
||||
|
||||
|
@ -152,6 +184,8 @@ def inclusion_only_unlimited_args(*args):
|
|||
', '.join(six.text_type(arg) for arg in args)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
inclusion_only_unlimited_args.anything = "Expected inclusion_only_unlimited_args __dict__"
|
||||
|
||||
|
||||
|
@ -163,6 +197,8 @@ def inclusion_only_unlimited_args_from_template(*args):
|
|||
', '.join(six.text_type(arg) for arg in args)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
inclusion_only_unlimited_args_from_template.anything = "Expected inclusion_only_unlimited_args_from_template __dict__"
|
||||
|
||||
|
||||
|
@ -170,6 +206,8 @@ inclusion_only_unlimited_args_from_template.anything = "Expected inclusion_only_
|
|||
def inclusion_tag_use_l10n(context):
|
||||
"""Expected inclusion_tag_use_l10n __doc__"""
|
||||
return {}
|
||||
|
||||
|
||||
inclusion_tag_use_l10n.anything = "Expected inclusion_tag_use_l10n __dict__"
|
||||
|
||||
|
||||
|
@ -182,6 +220,8 @@ def inclusion_unlimited_args_kwargs(one, two='hi', *args, **kwargs):
|
|||
', '.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__"
|
||||
|
||||
|
||||
|
@ -189,6 +229,8 @@ inclusion_unlimited_args_kwargs.anything = "Expected inclusion_unlimited_args_kw
|
|||
def inclusion_tag_without_context_parameter(arg):
|
||||
"""Expected inclusion_tag_without_context_parameter __doc__"""
|
||||
return {}
|
||||
|
||||
|
||||
inclusion_tag_without_context_parameter.anything = "Expected inclusion_tag_without_context_parameter __dict__"
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ class EchoNode(Node):
|
|||
@register.tag
|
||||
def echo(parser, token):
|
||||
return EchoNode(token.contents.split()[1:])
|
||||
|
||||
|
||||
register.tag('other_echo', echo)
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ from .utils import TEMPLATE_DIR
|
|||
|
||||
def test_processor(request):
|
||||
return {'processors': 'yes'}
|
||||
|
||||
|
||||
test_processor_name = 'template_tests.test_response.test_processor'
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue