start to get rid of the get_set_vars/get_defined_names distinction

This commit is contained in:
Dave Halter
2014-04-14 12:28:14 +02:00
parent 4c53a64ca0
commit 237af765b7
3 changed files with 7 additions and 14 deletions

View File

@@ -29,6 +29,7 @@ def defined_names(evaluator, scope):
pair = next(get_names_of_scope(evaluator, scope, star_search=False,
include_builtin=False), None)
names = pair[1] if pair else []
names = [n for n in names if isinstance(n, pr.Import) or (len(n) == 1)]
return [Definition(evaluator, d) for d in sorted(names, key=lambda s: s.start_pos)]