1
0
forked from VimPlug/jedi

Remove a lot more Python 2 mentions and todos

This commit is contained in:
Dave Halter
2020-07-02 10:30:58 +02:00
parent a51f667be8
commit 7f67324210
9 changed files with 15 additions and 37 deletions

View File

@@ -6,6 +6,7 @@ from collections import namedtuple
import warnings
import re
import builtins
import typing
from jedi.inference.compiled.getattr_static import getattr_static
@@ -504,15 +505,9 @@ class DirectObjectAccess(object):
return None
try:
# Python 2 doesn't have typing.
import typing
except ImportError:
o = typing.get_type_hints(self._obj).get('return')
except Exception:
pass
else:
try:
o = typing.get_type_hints(self._obj).get('return')
except Exception:
pass
return self._create_access_path(o)