From 1122ea67a11887ed44fbeb5c163d734bafa61df0 Mon Sep 17 00:00:00 2001 From: Sean Wallace Date: Sat, 27 Jun 2020 12:08:48 -0400 Subject: [PATCH] Fix flake8. --- analytical/templatetags/analytical.py | 4 ++-- analytical/tests/templatetags/dummy.py | 2 +- analytical/tests/test_tag_analytical.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/analytical/templatetags/analytical.py b/analytical/templatetags/analytical.py index 72eaeb6..b411cb9 100644 --- a/analytical/templatetags/analytical.py +++ b/analytical/templatetags/analytical.py @@ -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) diff --git a/analytical/tests/templatetags/dummy.py b/analytical/tests/templatetags/dummy.py index f92bc98..b7667de 100644 --- a/analytical/tests/templatetags/dummy.py +++ b/analytical/tests/templatetags/dummy.py @@ -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): diff --git a/analytical/tests/test_tag_analytical.py b/analytical/tests/test_tag_analytical.py index e4e47a8..c12ac48 100644 --- a/analytical/tests/test_tag_analytical.py +++ b/analytical/tests/test_tag_analytical.py @@ -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)