mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 13:51:37 +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> |
||
---|---|---|
.. | ||
visitor | ||
comparable.rs | ||
docstrings.rs | ||
expression.rs | ||
hashable.rs | ||
helpers.rs | ||
identifier.rs | ||
int.rs | ||
lib.rs | ||
name.rs | ||
node.rs | ||
nodes.rs | ||
parenthesize.rs | ||
relocate.rs | ||
statement_visitor.rs | ||
stmt_if.rs | ||
str.rs | ||
str_prefix.rs | ||
traversal.rs | ||
types.rs | ||
visitor.rs | ||
whitespace.rs |