You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromtypingimportLiteraldeffoo(a: Literal[True]) ->None:
...
FOO: boolfoo(FOO) # error: Argument 1 to "foo" has incompatible type "bool"; expected "Literal[True]" [arg-type]reveal_type(FOO) # note: Revealed type is "builtins.bool"ifnotFOO:
passreveal_type(FOO) # note: Revealed type is "Literal[True]"ifnotFOO:
passimporttest2
test2.py:
fromtestimportFOOreveal_type(FOO) # note: Revealed type is "builtins.bool"ifFOO:
passreveal_type(FOO) # note: Revealed type is "Literal[True]"