-
-
Notifications
You must be signed in to change notification settings - Fork 3k
support platform and version checks in conditional expressions #5671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We do support platform and version checks, but only |
Ah, sorry, I didn't mean this to be about |
Ah, interesting, with this:
This reveals |
(OT: |
This is a duplicate of #5550. I will raise the priority of that issue (but still not high probably, since there is a simple workaround). |
Uh oh!
There was an error while loading. Please reload this page.
I wanted to write
os.environb if sys.version_info[0] == 3 else os.environ
to obtain a dictionary of bytes environmental variables. However, this fails to typecheck on Python 2 because mypy doesn't recognize the version in conditional expressions.The text was updated successfully, but these errors were encountered: