We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07b618a commit 0b64e72Copy full SHA for 0b64e72
doc/build/unreleased/418.rst
@@ -0,0 +1,7 @@
1
+.. change::
2
+ :tags: bug, parser
3
+ :tickets: 418
4
+
5
+ Fix undefined variable errors when strict_undefined is True and using
6
+ nested list comprehension.
7
mako/pyparser.py
@@ -93,6 +93,7 @@ def visit_FunctionDef(self, node):
93
def visit_ListComp(self, node):
94
if self.in_function:
95
for comp in node.generators:
96
+ self.visit(comp.target)
97
self.visit(comp.iter)
98
else:
99
self.generic_visit(node)
@@ -102,6 +103,7 @@ def visit_ListComp(self, node):
102
103
def visit_DictComp(self, node):
104
105
106
107
108
109
0 commit comments