Add tests for typing.TYPE_CHECKING

This commit is contained in:
Dave Halter
2018-08-30 01:14:48 +02:00
parent bf6974dabb
commit 80ab4d8ff5

View File

@@ -318,3 +318,13 @@ class WithTypeVar(typing.Generic[TYPE_VAR]):
def maaan(p: WithTypeVar[int]):
#? int()
p.lala()
if typing.TYPE_CHECKING:
with_type_checking = 1
else:
without_type_checking = 1.0
#? int()
with_type_checking
#?
without_type_checking