From 6a82f609012be2560f34902de037aacbbe93c2e2 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 2 Aug 2019 13:49:01 +0200 Subject: [PATCH] Parameter.kind is not avaialble in Python 3.5 --- jedi/api/classes.py | 4 ++-- test/test_api/test_signatures.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jedi/api/classes.py b/jedi/api/classes.py index bd5e2210..c53dc44f 100644 --- a/jedi/api/classes.py +++ b/jedi/api/classes.py @@ -694,9 +694,9 @@ class ParamDefinition(Definition): Returns an enum instance. Returns the same values as the builtin :py:attr:`inspect.Parameter.kind`. - No support for Python 2 anymore. + No support for Python < 3.4 anymore. """ - if sys.version_info[0] < 3: + if sys.version_info < (3, 5): raise NotImplementedError( 'Python 2 is end-of-life, the new feature is not available for it' ) diff --git a/test/test_api/test_signatures.py b/test/test_api/test_signatures.py index 3d3e73ac..12db4c0b 100644 --- a/test/test_api/test_signatures.py +++ b/test/test_api/test_signatures.py @@ -58,7 +58,7 @@ def test_param_default(Script, code, expected_params): ('def f(*args, x): ...\nf', 1, 'x', 'KEYWORD_ONLY'), ] ) -def test_param_kind_and_name(code, index, param_code, kind, Script, skip_python2): +def test_param_kind_and_name(code, index, param_code, kind, Script, skip_pre_python35): func, = Script(code).goto_assignments() sig, = func.get_signatures() param = sig.params[index]