@@ -481,20 +481,20 @@ import typing
481481def make() -> bool: pass
482482PY2 = PY3 = make()
483483
484- a = PY2 and 's'
485- b = PY3 and 's'
486- c = PY2 or 's'
487- d = PY3 or 's'
488- e = (PY2 or PY3) and 's'
489- f = (PY3 or PY2) and 's'
490- g = (PY2 or PY3) or 's'
491- h = (PY3 or PY2) or 's'
484+ a = PY2 and str()
485+ b = PY3 and str()
486+ c = PY2 or str()
487+ d = PY3 or str()
488+ e = (PY2 or PY3) and str()
489+ f = (PY3 or PY2) and str()
490+ g = (PY2 or PY3) or str()
491+ h = (PY3 or PY2) or str()
492492reveal_type(a) # N: Revealed type is "builtins.bool"
493- reveal_type(b) # N: Revealed type is "Literal['s'] "
494- reveal_type(c) # N: Revealed type is "Literal['s'] "
493+ reveal_type(b) # N: Revealed type is "builtins.str "
494+ reveal_type(c) # N: Revealed type is "builtins.str "
495495reveal_type(d) # N: Revealed type is "builtins.bool"
496- reveal_type(e) # N: Revealed type is "Literal['s'] "
497- reveal_type(f) # N: Revealed type is "Literal['s'] "
496+ reveal_type(e) # N: Revealed type is "builtins.str "
497+ reveal_type(f) # N: Revealed type is "builtins.str "
498498reveal_type(g) # N: Revealed type is "builtins.bool"
499499reveal_type(h) # N: Revealed type is "builtins.bool"
500500[builtins fixtures/ops.pyi]
@@ -504,20 +504,20 @@ reveal_type(h) # N: Revealed type is "builtins.bool"
504504# flags: --platform linux
505505import sys
506506
507- t_and_t = (sys.platform == 'linux' and sys.platform == 'linux') and 's'
508- t_or_t = (sys.platform == 'linux' or sys.platform == 'linux') and 's'
509- t_and_f = (sys.platform == 'linux' and sys.platform == 'windows') and 's'
510- t_or_f = (sys.platform == 'linux' or sys.platform == 'windows') and 's'
511- f_and_t = (sys.platform == 'windows' and sys.platform == 'linux') and 's'
512- f_or_t = (sys.platform == 'windows' or sys.platform == 'linux') and 's'
513- f_and_f = (sys.platform == 'windows' and sys.platform == 'windows') and 's'
514- f_or_f = (sys.platform == 'windows' or sys.platform == 'windows') and 's'
515- reveal_type(t_and_t) # N: Revealed type is "Literal['s'] "
516- reveal_type(t_or_t) # N: Revealed type is "Literal['s'] "
507+ t_and_t = (sys.platform == 'linux' and sys.platform == 'linux') and str()
508+ t_or_t = (sys.platform == 'linux' or sys.platform == 'linux') and str()
509+ t_and_f = (sys.platform == 'linux' and sys.platform == 'windows') and str()
510+ t_or_f = (sys.platform == 'linux' or sys.platform == 'windows') and str()
511+ f_and_t = (sys.platform == 'windows' and sys.platform == 'linux') and str()
512+ f_or_t = (sys.platform == 'windows' or sys.platform == 'linux') and str()
513+ f_and_f = (sys.platform == 'windows' and sys.platform == 'windows') and str()
514+ f_or_f = (sys.platform == 'windows' or sys.platform == 'windows') and str()
515+ reveal_type(t_and_t) # N: Revealed type is "builtins.str "
516+ reveal_type(t_or_t) # N: Revealed type is "builtins.str "
517517reveal_type(f_and_t) # N: Revealed type is "builtins.bool"
518- reveal_type(f_or_t) # N: Revealed type is "Literal['s'] "
518+ reveal_type(f_or_t) # N: Revealed type is "builtins.str "
519519reveal_type(t_and_f) # N: Revealed type is "builtins.bool"
520- reveal_type(t_or_f) # N: Revealed type is "Literal['s'] "
520+ reveal_type(t_or_f) # N: Revealed type is "builtins.str "
521521reveal_type(f_and_f) # N: Revealed type is "builtins.bool"
522522reveal_type(f_or_f) # N: Revealed type is "builtins.bool"
523523[builtins fixtures/ops.pyi]
@@ -526,26 +526,26 @@ reveal_type(f_or_f) # N: Revealed type is "builtins.bool"
526526# flags: --platform linux
527527import sys
528528
529- not_t = not sys.platform == 'linux' and 's'
530- not_f = not sys.platform == 'windows' and 's'
531- not_and_t = not (sys.platform == 'linux' and sys.platform == 'linux') and 's'
532- not_and_f = not (sys.platform == 'linux' and sys.platform == 'windows') and 's'
533- not_or_t = not (sys.platform == 'linux' or sys.platform == 'linux') and 's'
534- not_or_f = not (sys.platform == 'windows' or sys.platform == 'windows') and 's'
529+ not_t = not sys.platform == 'linux' and str()
530+ not_f = not sys.platform == 'windows' and str()
531+ not_and_t = not (sys.platform == 'linux' and sys.platform == 'linux') and str()
532+ not_and_f = not (sys.platform == 'linux' and sys.platform == 'windows') and str()
533+ not_or_t = not (sys.platform == 'linux' or sys.platform == 'linux') and str()
534+ not_or_f = not (sys.platform == 'windows' or sys.platform == 'windows') and str()
535535reveal_type(not_t) # N: Revealed type is "builtins.bool"
536- reveal_type(not_f) # N: Revealed type is "Literal['s'] "
536+ reveal_type(not_f) # N: Revealed type is "builtins.str "
537537reveal_type(not_and_t) # N: Revealed type is "builtins.bool"
538- reveal_type(not_and_f) # N: Revealed type is "Literal['s'] "
538+ reveal_type(not_and_f) # N: Revealed type is "builtins.str "
539539reveal_type(not_or_t) # N: Revealed type is "builtins.bool"
540- reveal_type(not_or_f) # N: Revealed type is "Literal['s'] "
540+ reveal_type(not_or_f) # N: Revealed type is "builtins.str "
541541[builtins fixtures/ops.pyi]
542542
543543[case testConditionalValuesUnsupportedOps]
544544# flags: --platform linux
545545import sys
546546
547- unary_minus = -(sys.platform == 'linux') and 's'
548- binary_minus = ((sys.platform == 'linux') - (sys.platform == 'linux')) and 's'
547+ unary_minus = -(sys.platform == 'linux') and str()
548+ binary_minus = ((sys.platform == 'linux') - (sys.platform == 'linux')) and str()
549549reveal_type(unary_minus) # N: Revealed type is "Union[Literal[0], builtins.str]"
550550reveal_type(binary_minus) # N: Revealed type is "Union[Literal[0], builtins.str]"
551551[builtins fixtures/ops.pyi]
0 commit comments