Jedi raised an error when defined_names was called on empty functions, fixes #697.
This commit is contained in:
1 parent
1c0aa06c7d
commit
3ad67a4ec7
2 files changed
+21
-8
No files matched your search
@@ -58,6 +58,9 @@ def filter_definition_names(names, origin, position=None):
|
||||
Filter names that are actual definitions in a scope. Names that are just
|
||||
used will be ignored.
|
||||
"""
|
||||
if not names:
|
||||
return []
|
||||
|
||||
# Just calculate the scope from the first
|
||||
stmt = names[0].get_definition()
|
||||
scope = stmt.get_parent_scope()
|
||||
|
||||
Reference in new issue
Block a user