From 9ab5937a3c07dc3957d337671474435db3b8abe4 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 1 Sep 2017 18:03:47 +0200 Subject: [PATCH] Fix yield scanning. --- parso/python/tree.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parso/python/tree.py b/parso/python/tree.py index c169caf..f48fae1 100644 --- a/parso/python/tree.py +++ b/parso/python/tree.py @@ -521,6 +521,9 @@ class Function(ClassOrFunc): """ def scan(children): for element in children: + if element.type in ('classdef', 'funcdef', 'lambdef'): + continue + try: nested_children = element.children except AttributeError: