1
0
forked from VimPlug/jedi

none positions shouldn't be an option, (0, 0) is the 'invalid' or 'generated' position for objects that are always found

This commit is contained in:
David Halter
2012-11-24 17:42:52 +01:00
parent e921ec11e3
commit 1e259c1c6e
2 changed files with 7 additions and 3 deletions

View File

@@ -949,8 +949,12 @@ def get_defined_names_for_position(scope, position=None, start_scope=None):
return names
names_new = []
for n in names:
if n.start_pos < position:
try:
if n.start_pos[0] is not None and n.start_pos < position:
names_new.append(n)
except:
print(n, position, n.parent())
raise
return names_new