File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1184,15 +1184,7 @@ def test_eval_bool_04():
11841184
11851185
11861186type IsIntBool [T ] = Bool [IsSub [T , int ]]
1187- type IsIntLiteral [T ] = Literal [True ] if IsIntBool [T ] else Literal [False ]
1188-
1189-
1190- def test_eval_bool_05 ():
1191- d = eval_typing (IsIntLiteral [int ])
1192- assert d == Literal [True ]
1193-
1194- d = eval_typing (IsIntLiteral [str ])
1195- assert d == Literal [False ]
1187+ type IsIntLiteral [T ] = Literal [True ] if Bool [IsIntBool [T ]] else Literal [False ]
11961188
11971189
11981190def test_eval_all_01 ():
@@ -1231,7 +1223,7 @@ def test_eval_all_02():
12311223
12321224type ContainsAllInt [Ts ] = AllOf [* [IsSub [t , int ] for t in Iter [Ts ]]]
12331225type ContainsAllIntToLiteral [Ts ] = (
1234- Literal [True ] if ContainsAllInt [Ts ] else Literal [False ]
1226+ Literal [True ] if Bool [ ContainsAllInt [Ts ] ] else Literal [False ]
12351227)
12361228
12371229
@@ -1314,7 +1306,7 @@ def test_eval_any_02():
13141306
13151307type ContainsAnyInt [Ts ] = AnyOf [* [IsSub [t , int ] for t in Iter [Ts ]]]
13161308type ContainsAnyIntToLiteral [Ts ] = (
1317- Literal [True ] if ContainsAnyInt [Ts ] else Literal [False ]
1309+ Literal [True ] if Bool [ ContainsAnyInt [Ts ] ] else Literal [False ]
13181310)
13191311
13201312
You can’t perform that action at this time.
0 commit comments