Skip to content

Commit

Permalink
Fix flake8.
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-wallace authored and bittner committed Jun 28, 2020
1 parent 438b140 commit 88197ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions analytical/templatetags/analytical.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def render(self, context):


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)
Expand Down
2 changes: 1 addition & 1 deletion analytical/tests/templatetags/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def render(self, context):
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):
Expand Down
6 changes: 3 additions & 3 deletions analytical/tests/test_tag_analytical.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ def render_location_tag(self, location, vars=None):
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)

0 comments on commit 88197ca

Please sign in to comment.