From 409ee5568a1937c055dc1b944d4b0311abb7ff12 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 31 Dec 2015 11:04:26 +0100 Subject: [PATCH] test with different ways of importing the typing module --- test/completion/pep0484_typing.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/completion/pep0484_typing.py b/test/completion/pep0484_typing.py index 6b085fc2..0467c8c5 100644 --- a/test/completion/pep0484_typing.py +++ b/test/completion/pep0484_typing.py @@ -183,3 +183,18 @@ def optional( class ForwardReference: pass + +import typing as t +def union2(x: t.Union[int, str]): + #? int() str() + x + +from typing import Union +def union3(x: Union[int, str]): + #? int() str() + x + +from typing import Union as U +def union4(x: U[int, str]): + #? int() str() + x