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
{{ message }}
Repository navigation
(🐞) Artificially literal bools not considered when performing reachability checks where branch terminates #12365
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:
changed the title [-](🎁) Consider artificially literal bools when performing reachability checks[/-][+](🐞) Artificially literal bools not consider when performing reachability checks where branch terminates[/+]on Mar 17, 2022
changed the title [-](🐞) Artificially literal bools not consider when performing reachability checks where branch terminates[/-][+](🐞) Artificially literal bools not considered when performing reachability checks where branch terminates[/+]on Mar 17, 2022
Activity
[-](🎁) Consider artificially literal bools when performing reachability checks[/-][+](🐞) Artificially literal bools not consider when performing reachability checks where branch terminates[/+][-](🐞) Artificially literal bools not consider when performing reachability checks where branch terminates[/-][+](🐞) Artificially literal bools not considered when performing reachability checks where branch terminates[/+]KotlinIsland commentedon Mar 17, 2022
@a_maintainer Can you mark this as bug(🐞), I updated the title, but can't change the tags(😥)