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

Support narrowing literals and enums using the in operator in combination with tuple expressions. #17044

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Commits on Mar 17, 2024

  1. Support narrowing literals and enums using the in operator in combina…

    …tion with tuple expressions.
    
    The general idea is to transform expressions like
    
    (x is None) and (x in (1, 2)) and (x not in (3, 4))
    
    into
    
    (x is None) and (x == 1 or x == 2) and (x != 3 and x != 4)
    
    This transformation circumvents the need to extend the (already complicated) narrowing logic further.
    tyralla committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    e83679f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0d1db3 View commit details
    Browse the repository at this point in the history
  3. fix

    tyralla committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    2bff3c2 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'feature/narrow_using_in' of https://github.com/tyralla/…

    …mypy into feature/narrow_using_in
    tyralla committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    5e8a525 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2fa954a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    db7b969 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. Configuration menu
    Copy the full SHA
    23bfd4e View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2024

  1. Configuration menu
    Copy the full SHA
    207c56e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dea2614 View commit details
    Browse the repository at this point in the history
  3. Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"

    This reverts commit dea2614.
    tyralla committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    214f51a View commit details
    Browse the repository at this point in the history
  4. Revert "replace the critical in comparisons for testing"

    This reverts commit 207c56e.
    tyralla committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    a495fee View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. fix mypyc crash

    tyralla committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    8785fe9 View commit details
    Browse the repository at this point in the history
  2. make NameExpr mypyc copyable

    tyralla committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    6af40ae View commit details
    Browse the repository at this point in the history
  3. ignore star expressions

    tyralla committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    e52eb25 View commit details
    Browse the repository at this point in the history
  4. update docs

    tyralla committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    763c265 View commit details
    Browse the repository at this point in the history