File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -540,6 +540,16 @@ reveal_type(not_or_t) # N: Revealed type is "builtins.bool"
540540reveal_type(not_or_f) # N: Revealed type is "Literal['s']"
541541[builtins fixtures/ops.pyi]
542542
543+ [case testConditionalValuesUnsupportedOps]
544+ # flags: --platform linux
545+ import sys
546+
547+ unary_minus = -(sys.platform == 'linux') and 's'
548+ binary_minus = ((sys.platform == 'linux') - (sys.platform == 'linux')) and 's'
549+ reveal_type(unary_minus) # N: Revealed type is "Union[Literal[0], builtins.str]"
550+ reveal_type(binary_minus) # N: Revealed type is "Union[Literal[0], builtins.str]"
551+ [builtins fixtures/ops.pyi]
552+
543553[case testShortCircuitAndWithConditionalAssignment]
544554# flags: --platform linux
545555import sys
You can’t perform that action at this time.
0 commit comments