mirror of
https://github.com/django/django.git
synced 2025-10-29 00:26:07 +00:00
Corrected many style guide violations that the newest version of flake8 catches
This commit is contained in:
@@ -926,7 +926,7 @@ def pluralize(value, arg='s'):
|
||||
* If value is 1, cand{{ value|pluralize:"y,ies" }} displays "1 candy".
|
||||
* If value is 2, cand{{ value|pluralize:"y,ies" }} displays "2 candies".
|
||||
"""
|
||||
if not ',' in arg:
|
||||
if ',' not in arg:
|
||||
arg = ',' + arg
|
||||
bits = arg.split(',')
|
||||
if len(bits) > 2:
|
||||
|
||||
@@ -605,7 +605,7 @@ def cycle(parser, token):
|
||||
name = args[1]
|
||||
if not hasattr(parser, '_namedCycleNodes'):
|
||||
raise TemplateSyntaxError("No named cycles in template. '%s' is not defined" % name)
|
||||
if not name in parser._namedCycleNodes:
|
||||
if name not in parser._namedCycleNodes:
|
||||
raise TemplateSyntaxError("Named cycle '%s' does not exist" % name)
|
||||
return parser._namedCycleNodes[name]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user