From 1e6397b1639bb048711c1ad9db6f0b9f58713dee Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 15 Dec 2015 11:56:54 +0100 Subject: [PATCH] check 'assigned types'-support (comes out of the jedi-box), and add tests for that --- jedi/evaluate/pep0484.py | 2 +- test/completion/pep0484.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/jedi/evaluate/pep0484.py b/jedi/evaluate/pep0484.py index 2c2cb173..e31e842a 100644 --- a/jedi/evaluate/pep0484.py +++ b/jedi/evaluate/pep0484.py @@ -10,7 +10,7 @@ v Function returntype annotations with builtin/custom type classes v Function parameter annotations with strings (forward reference) v Function return type annotations with strings (forward reference) x Local variable type hints -x Assigned types: `Url = str\ndef get(url:Url) -> str:` +v Assigned types: `Url = str\ndef get(url:Url) -> str:` x Type hints in `with` statements x Stub files support x support `@no_type_check` and `@no_type_check_decorator` diff --git a/test/completion/pep0484.py b/test/completion/pep0484.py index 9e1c5e00..bba6f50a 100644 --- a/test/completion/pep0484.py +++ b/test/completion/pep0484.py @@ -133,3 +133,12 @@ def function_forward_reference_dynamic( def return_str_type(): return str + + +X = str +def function_with_assined_class_in_reference(x: X, y: "Y"): + #? str() + x + #? int() + y +Y = int