ruff/crates/ruff_python_ast
Dhruv Manilawala 78bbf6d403
New Singleton enum for PatternMatchSingleton node (#8063)
## 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`.
2023-10-30 05:48:53 +00:00
..
src New Singleton enum for PatternMatchSingleton node (#8063) 2023-10-30 05:48:53 +00:00
tests New Singleton enum for PatternMatchSingleton node (#8063) 2023-10-30 05:48:53 +00:00
Cargo.toml Implement our own small-integer optimization (#7584) 2023-09-25 15:13:21 +00:00