1
0
forked from VimPlug/jedi

Make sure the latest changes work with Python 3.6/3.7

This commit is contained in:
Dave Halter
2020-01-10 15:14:22 +01:00
parent 3ba68b5bc6
commit 4f56ec5daf
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -500,7 +500,10 @@ class DirectObjectAccess(object):
name = m.group(1)
import typing
args = typing.get_args(self._obj)
if sys.version_info >= (3, 8):
args = typing.get_args(self._obj)
else:
args = safe_getattr(self._obj, '__args__', default=None)
return name, tuple(self._create_access_path(arg) for arg in args)
def needs_type_completions(self):