1
0
forked from VimPlug/jedi

Annotations can contain forward references even if they are not a string anymore

Since Python 3.7 this behavior can be imported with from future import __annotations
This commit is contained in:
Dave Halter
2018-07-28 16:35:24 +02:00
parent b073b05aa0
commit 9bba91628a
4 changed files with 28 additions and 5 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ class NameFinder(object):
ancestor = search_ancestor(origin_scope, 'funcdef', 'classdef')
if ancestor is not None:
colon = ancestor.children[-2]
if position < colon.start_pos:
if position is not None and position < colon.start_pos:
if lambdef is None or position < lambdef.children[-2].start_pos:
position = ancestor.start_pos