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

View File

@@ -216,5 +216,5 @@ class ModuleContext(TreeContext):
return "<%s: %s@%s-%s is_stub=%s>" % (
self.__class__.__name__, self._string_name,
self.tree_node.start_pos[0], self.tree_node.end_pos[0],
self._path.endswith('.pyi')
self._path is not None and self._path.endswith('.pyi')
)