Skip to content

Commit a9fd1ad

Browse files
link github issues
1 parent 92bc6a4 commit a9fd1ad

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

test-data/unit/check-literal.test

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
29502951
def 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
29562958
def 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
29622965
def 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
29692972
def 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
29762979
def 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
29832986
def 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
30213024
from typing import TypeVar, Union, Callable, reveal_type
30223025

30233026
NOOP = 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
30523055
from typing import TypeVar, Union, Callable, reveal_type
30533056

30543057
NOOP = lambda: None

test-data/unit/check-optional.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ reveal_type(l) # N: Revealed type is "builtins.list[typing.Generator[builtins.s
427427
[builtins fixtures/list.pyi]
428428

429429
[case testNoneListTernary]
430-
# gh-19534
430+
# https://github.com/python/mypy/issues/19534
431431
x = [None] if "" else [1]
432432
reveal_type(x) # N: Revealed type is "Union[builtins.list[None], builtins.list[builtins.int]]"
433433
[builtins fixtures/list.pyi]

0 commit comments

Comments
 (0)