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
Thanks for the report. Platform checks currently only apply within the if/elif/else statement. If you use an explicit else branch, this will work as expected:
importsysdeffoo() ->None:
ifsys.platform!="darwin":
print("not darwin")
returnelse:
print("darwin") # OK
mypy
claims to understandsys.platform
checks, yet is defeated by!=
.I would expect
mypy
not to warn about unreachable code here:sys.platform
to an intermediateThe text was updated successfully, but these errors were encountered: