Skip to content

Commit 43f8498

Browse files
committed
Add parens for py3.8
1 parent 83bb7fc commit 43f8498

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test-data/unit/check-inference.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4013,7 +4013,7 @@ def check_or_nested(maybe: bool) -> None:
40134013
def 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:
40364036
def 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:

0 commit comments

Comments
 (0)