ducktyping tests

This commit is contained in:
David Halter
2012-09-04 15:37:37 +02:00
parent db7c2fc6e7
commit 51ee262706
3 changed files with 41 additions and 8 deletions

View File

@@ -892,7 +892,8 @@ def get_names_for_scope(scope, position=None, star_search=True,
the whole thing would probably start a little recursive madness.
"""
in_func_scope = scope
non_flow = scope.get_parent_until(parsing.Flow, reverse=True)
non_flow = scope.get_parent_until(parsing.Flow, reverse=True,
include_current=True)
while scope:
# `parsing.Class` is used, because the parent is never `Class`.
# Ignore the Flows, because the classes and functions care for that.