@@ -2947,39 +2947,42 @@ reveal_type(C().word) # N: Revealed type is "Literal['word']"
29472947[builtins fixtures/tuple.pyi]
29482948
29492949[case testStringLiteralTernary]
2950+ # https://github.com/python/mypy/issues/19534
29502951def test(b: bool) -> None:
29512952 l = "foo" if b else "bar"
29522953 reveal_type(l) # N: Revealed type is "builtins.str"
29532954[builtins fixtures/tuple.pyi]
29542955
29552956[case testintLiteralTernary]
2957+ # https://github.com/python/mypy/issues/19534
29562958def test(b: bool) -> None:
29572959 l = 0 if b else 1
29582960 reveal_type(l) # N: Revealed type is "builtins.int"
29592961[builtins fixtures/tuple.pyi]
29602962
29612963[case testStringIntUnionTernary]
2964+ # https://github.com/python/mypy/issues/19534
29622965def test(b: bool) -> None:
29632966 l = 1 if b else "a"
29642967 reveal_type(l) # N: Revealed type is "Union[builtins.int, builtins.str]"
29652968[builtins fixtures/tuple.pyi]
29662969
29672970[case testListComprehensionTernary]
2968- # gh- 19534
2971+ # https://github.com/python/mypy/issues/ 19534
29692972def test(b: bool) -> None:
29702973 l = [1] if b else ["a"]
29712974 reveal_type(l) # N: Revealed type is "Union[builtins.list[builtins.int], builtins.list[builtins.str]]"
29722975[builtins fixtures/list.pyi]
29732976
29742977[case testSetComprehensionTernary]
2975- # gh- 19534
2978+ # https://github.com/python/mypy/issues/ 19534
29762979def test(b: bool) -> None:
29772980 s = {1} if b else {"a"}
29782981 reveal_type(s) # N: Revealed type is "Union[builtins.set[builtins.int], builtins.set[builtins.str]]"
29792982[builtins fixtures/set.pyi]
29802983
29812984[case testDictComprehensionTernary]
2982- # gh- 19534
2985+ # https://github.com/python/mypy/issues/ 19534
29832986def test(b: bool) -> None:
29842987 d = {1:1} if "" else {"a": "a"}
29852988 reveal_type(d) # N: Revealed type is "Union[builtins.dict[builtins.int, builtins.int], builtins.dict[builtins.str, builtins.str]]"
@@ -3017,7 +3020,7 @@ def test_generic(x: Union[A, None]) -> None:
30173020
30183021[case testLambdaTernaryIndirectAttribute]
30193022# fails due to binder issue inside `check_func_def`
3020- # gh- 19561
3023+ # https://github.com/python/mypy/issues/ 19561
30213024from typing import TypeVar, Union, Callable, reveal_type
30223025
30233026NOOP = lambda: None
@@ -3048,7 +3051,7 @@ def test_generic_with_attr(x: B) -> None:
30483051
30493052[case testLambdaTernaryDoubleIndirectAttribute]
30503053# fails due to binder issue inside `check_func_def`
3051- # gh- 19561
3054+ # https://github.com/python/mypy/issues/ 19561
30523055from typing import TypeVar, Union, Callable, reveal_type
30533056
30543057NOOP = lambda: None
0 commit comments