mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
This makes sure we always wrap elements in a SubscriptElement, even when there is only one element. This makes things more regular while still being backwards compatible with existing creation. The meat of this is in two halves, which can't be split due to not wanting to break the build between commits. The first half is just the changes to the parser and updates to tests. This includes a test to be sure we can still render code that uses old construction types. The second half is changes to codegen which made assumptions about `Subscript` and demonstrates the need to make this change in the first place. This includes a fix to `CSTNode.with_deep_changes` type to make it more correct and also more usable in transforms without additional type assertions. |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| gather.py | ||
| gen_matcher_classes.py | ||
| gen_type_mapping.py | ||
| gen_visitor_functions.py | ||
| generate.py | ||
| transforms.py | ||