mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-28 20:32:19 +08:00
Fix for loops.
This commit is contained in:
@@ -982,6 +982,12 @@ class ForStmt(Flow):
|
|||||||
type = 'for_stmt'
|
type = 'for_stmt'
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
|
|
||||||
|
def nodes_to_execute(self, last_added=False):
|
||||||
|
# We shouldn't include the definitions.
|
||||||
|
for child in self.children[3:]:
|
||||||
|
for node_to_execute in child.nodes_to_execute():
|
||||||
|
yield node_to_execute
|
||||||
|
|
||||||
|
|
||||||
class TryStmt(Flow):
|
class TryStmt(Flow):
|
||||||
type = 'try_stmt'
|
type = 'try_stmt'
|
||||||
|
|||||||
Reference in New Issue
Block a user