mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Make sure the latest changes work with Python 3.6/3.7
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -641,7 +641,7 @@ def bar():
|
||||
return float
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info < (3, 5), reason="Ignore Python 2, because EOL")
|
||||
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Ignore Python 2, because EOL")
|
||||
@pytest.mark.parametrize(
|
||||
'annotations, result, code', [
|
||||
({}, [], ''),
|
||||
|
||||
Reference in New Issue
Block a user