mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-17 00:50:16 +00:00
![]() ## Summary This PR adds a new `Singleton` enum for the `PatternMatchSingleton` node. Earlier the node was using the `Constant` enum but the value for this pattern can only be either `None`, `True` or `False`. With the coming PR to remove the `Constant`, this node required a new type to fill in. This also has the benefit of narrowing the type down to only the possible values for the node as evident by the removal of `unreachable`. ## Test Plan Update the AST snapshots and run `cargo test`. |
||
---|---|---|
.. | ||
mod.rs | ||
pattern_arguments.rs | ||
pattern_keyword.rs | ||
pattern_match_as.rs | ||
pattern_match_class.rs | ||
pattern_match_mapping.rs | ||
pattern_match_or.rs | ||
pattern_match_sequence.rs | ||
pattern_match_singleton.rs | ||
pattern_match_star.rs | ||
pattern_match_value.rs |