We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cae4615 commit a500826Copy full SHA for a500826
test-data/unit/check-unreachable-code.test
@@ -540,6 +540,16 @@ reveal_type(not_or_t) # N: Revealed type is "builtins.bool"
540
reveal_type(not_or_f) # N: Revealed type is "Literal['s']"
541
[builtins fixtures/ops.pyi]
542
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
553
[case testShortCircuitAndWithConditionalAssignment]
554
# flags: --platform linux
555
import sys
0 commit comments