Fix flake8.

This commit is contained in:
Sean Wallace 2020-06-27 12:08:48 -04:00
parent 9aa6221b64
commit 1122ea67a1
3 changed files with 6 additions and 6 deletions

View file

@ -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)

View file

@ -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):

View file

@ -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)