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
There is already some disparity between naturally literal bools(annotated with Literal or narrowed) and artificially literal bools (platform, python-version, always-true, TYPE_CHECKING etc):
# mypy: always-true=foofromtypingimportLiteralfoo: boolifnotfoo:
print(1) # no error ✅bar: Literal[True]
ifnotbar:
print(1) # error: Statement is unreachable ✅
But this is not currently being applied to this situation: