mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-03-16 22:20:25 +00:00
Fix flake8.
This commit is contained in:
parent
9aa6221b64
commit
1122ea67a1
3 changed files with 6 additions and 6 deletions
|
|
@ -72,8 +72,8 @@ class AnalyticalNode(Node):
|
|||
|
||||
|
||||
def _load_template_nodes():
|
||||
template_nodes = dict((l, dict((p, []) for p in TAG_POSITIONS))
|
||||
for l in TAG_LOCATIONS)
|
||||
template_nodes = dict((loc, dict((pos, []) for pos in TAG_POSITIONS))
|
||||
for loc in TAG_LOCATIONS)
|
||||
|
||||
def add_node_cls(location, node, position=None):
|
||||
template_nodes[location][position].append(node)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ def _location_node(location):
|
|||
return DummyNode
|
||||
|
||||
|
||||
_location_nodes = dict((l, _location_node(l)) for l in TAG_LOCATIONS)
|
||||
_location_nodes = dict((loc, _location_node(loc)) for loc in TAG_LOCATIONS)
|
||||
|
||||
|
||||
def _location_tag(location):
|
||||
|
|
|
|||
|
|
@ -31,6 +31,6 @@ class AnalyticsTagTestCase(TagTestCase):
|
|||
return t.render(Context(vars))
|
||||
|
||||
def test_location_tags(self):
|
||||
for l in ['head_top', 'head_bottom', 'body_top', 'body_bottom']:
|
||||
r = self.render_location_tag(l)
|
||||
self.assertTrue('dummy_%s' % l in r, r)
|
||||
for loc in ['head_top', 'head_bottom', 'body_top', 'body_bottom']:
|
||||
r = self.render_location_tag(loc)
|
||||
self.assertTrue('dummy_%s' % loc in r, r)
|
||||
|
|
|
|||
Loading…
Reference in a new issue