mirror of
https://github.com/davidhalter/parso.git
synced 2026-05-24 09:18:52 +08:00
Fix yield scanning.
This commit is contained in:
@@ -521,6 +521,9 @@ class Function(ClassOrFunc):
|
|||||||
"""
|
"""
|
||||||
def scan(children):
|
def scan(children):
|
||||||
for element in children:
|
for element in children:
|
||||||
|
if element.type in ('classdef', 'funcdef', 'lambdef'):
|
||||||
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
nested_children = element.children
|
nested_children = element.children
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|||||||
Reference in New Issue
Block a user