mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-15 16:10:38 +00:00
![]() ## Summary This PR adds support for control flow for match statement. It also adds the necessary infrastructure required for narrowing constraints in case blocks and implements the logic for `PatternMatchSingleton` which is either `None` / `True` / `False`. Even after this the inferred type doesn't get simplified completely, there's a TODO for that in the test code. ## Test Plan Add test cases for control flow for (a) when there's a wildcard pattern and (b) when there isn't. There's also a test case to verify the narrowing logic. --------- Co-authored-by: Carl Meyer <carl@astral.sh> |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
README.md |
Integration tests for ruff_python_ast
This crate includes integration tests for the ruff_python_ast
crate.
The reason for having a separate crate is to avoid introducing a dev circular
dependency between the ruff_python_parser
crate and the ruff_python_ast
crate.
This crate shouldn't include any code, only tests.
Reference:
rust-analyzer
issue: https://github.com/rust-lang/rust-analyzer/issues/3390- Ruff's pull request: https://github.com/astral-sh/ruff/pull/11261