File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4013,7 +4013,7 @@ def check_or_nested(maybe: bool) -> None:
40134013def check_and(maybe: bool) -> None:
40144014 foo = None
40154015 bar = None
4016- if maybe and (foo := [1])[bar := 0]:
4016+ if maybe and (foo := [1])[( bar := 0) ]:
40174017 reveal_type(foo) # N: Revealed type is "builtins.list[builtins.int]"
40184018 reveal_type(bar) # N: Revealed type is "builtins.int"
40194019 else:
@@ -4036,7 +4036,7 @@ def check_and_nested(maybe: bool) -> None:
40364036def check_or(maybe: bool) -> None:
40374037 foo = None
40384038 bar = None
4039- if maybe or (foo := [1])[bar := 0]:
4039+ if maybe or (foo := [1])[( bar := 0) ]:
40404040 reveal_type(foo) # N: Revealed type is "Union[builtins.list[builtins.int], None]"
40414041 reveal_type(bar) # N: Revealed type is "Union[builtins.int, None]"
40424042 else:
You can’t perform that action at this time.
0 commit comments