@@ -54,13 +54,23 @@ class PythonVariableTypesTest : PythonAbstractInlayHintsTestCase() {
5454
5555 def get_now():
5656 return datetime.datetime.now()
57+
58+ def get_any_dict():
59+ return {}
60+
61+ def get_complex_dict():
62+ return {1: A(), 2: None, 3: [], 4: tuple()}
63+
64+ def get_complex_list():
65+ return [1, [[], 1, '3'], '', []]
5766 """ .trimIndent()
5867
5968 fun testSimple () = doTest(
6069 """
6170 x1<# [: int] #> = get_int()
6271 x2<# [: [[list [ A ]] | None]] #> = get_optional()
6372 x3<# [: TestTyped] #> = get_typed_dict()
73+ x4<# [: dict] #> = get_any_dict()
6474
6575 x7<# [: [A | None]] #> = A() or None
6676 x8<# [: [A | None]] #> = A() and None
@@ -98,7 +108,9 @@ class PythonVariableTypesTest : PythonAbstractInlayHintsTestCase() {
98108 g4 = A.from_val(1)
99109 g5 = Union[int, str]
100110 # g6 = UnionChild[int, str]
111+
101112 g7 = {k: None for k, _ in range(10)}
113+ g8 = {1: A(), 2: None, 3: [], 4: tuple()}
102114
103115 h1 = datetime.datetime.now()
104116 h2 = datetime.datetime()
@@ -109,7 +121,7 @@ class PythonVariableTypesTest : PythonAbstractInlayHintsTestCase() {
109121 """
110122 x<# [: [Coroutine [ Any , Any , int ]]] #> = coro()
111123 y<# [: [Coroutine [ Any , Any , int ]]] #> = x
112- z<# [: int] #> = await x
124+ z<# [: int] #> = await y
113125
114126 f = 1
115127 g = f
@@ -120,7 +132,9 @@ class PythonVariableTypesTest : PythonAbstractInlayHintsTestCase() {
120132 fun testComplex () = doTest(
121133 """
122134 x1<# [: [[list [ A ]] | None | list | ...]] #> = get_optional() or [] or {}
123- long_types<# [: [list [ [int | [list [ [list | int | ...] ]] | ...] ]]] #> = [1, [[], 1, '3'], '', []]
135+ complex_list<# [: [list [ [int | [list [ [list | int | ...] ]] | ...] ]]] #> = get_complex_list()
136+ complex_dict<# [: [dict [ int , [A | None | list | ...] ]]] #> = get_complex_dict()
137+
124138
125139 coro_callable<# [: [() -> ( [Coroutine [ Any , Any , int ]] )]] #> = coro
126140 one_coro<# [: [Coroutine [ Any , Any , int ]]] #> = await get_coro()
0 commit comments