You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: I'm trying to write an introspection that finds all the chains of Getitem or Getattr that start with an undefined Name. Like jinja2.find_undeclared_variables but that goes deeper into attribute chains when it's easy to do.
Now, I'm seeing that For.iter is visited within loop_frame, which doesn't make sense to me, as the loop_frame is defined as the frame of everything exceptiter:
children = node.iter_child_nodes(exclude=('iter',))
if node.recursive:
loop_frame = self.function_scoping(node, frame, children,
find_special=False)
else:
loop_frame = frame.inner()
loop_frame.inspect(children)
Can you confirm this is a bug that can be fixed?
The text was updated successfully, but these errors were encountered:
Context: I'm trying to write an introspection that finds all the chains of
Getitem
orGetattr
that start with an undefinedName
. Likejinja2.find_undeclared_variables
but that goes deeper into attribute chains when it's easy to do.Now, I'm seeing that
For.iter
is visited withinloop_frame
, which doesn't make sense to me, as theloop_frame
is defined as the frame of everything exceptiter
:Can you confirm this is a bug that can be fixed?
The text was updated successfully, but these errors were encountered: