Skip to content
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

Short-circuit if expression for always true/always false vars and MYPY/TYPE_CHECKING #5965

Merged
merged 1 commit into from Dec 20, 2018

Commits on Dec 19, 2018

  1. Short-circuit if expression for always true/always false vars and M…

    …YPY/TYPE_CHECKING
    
     - Always short-circuit in the if's expression, instead of only
       short-circuiting for "ALWAYS_TRUE/FALSE" constants (e.g. sys.platform
       checks) and not "MYPY_TRUE/FALSE" constants (e.g. `MYPY`)
    
     - Make --always-true and --always-false map to ALWAYS_TRUE and
       ALWAYS_FALSE, respectively, instead of MYPY_TRUE and MYPY_FALSE.
       The only difference between the two is a change in import priority,
       but semantically uses of "--always-true" are probably closer to
       "this condition should be true at compile time and runtime" than
       "this condition should be true at compile time but false at
       runtime".
    
     - Fixes python#5963
    samertm committed Dec 19, 2018
    Copy the full SHA
    dd63fcb View commit details
    Browse the repository at this point in the history