Repository navigation
Make the libcst (CST) backend usable for recipes - #270
Open
FrancescoPezzella wants to merge 7 commits into
Open
FrancescoPezzella wants to merge 7 commits into
FrancescoPezzella wants to merge 7 commits into
Conversation
Collaborator
Author
FrancescoPezzella
force-pushed
the
libcst-replace-framework
branch
from
October 11, 2026 12:15
cd60e49 to
9f4d682
Compare
…pansThe three CST xfails in test_offset_encoding now pass; spans match the RST backend (decorators included, trailing newline excluded).
references/referenced_by link each use to its definition (string annotations included), so MatchFinder's reference matching now works on the CST backend.
FrancescoPezzella
force-pushed
the
libcst-replace-framework
branch
from
October 12, 2026 09:53
cba56f6 to
803c953
Compare
FrancescoPezzella
added this pull request to stack #277
October 12, 2026 09:55
PythonRefactoring is generic over the node class (RST by default), and body returns the module's top-level statements on both backends.
Add extra TODOs regarding AI docstrings.
FrancescoPezzella
marked this pull request as ready for review
October 12, 2026 12:19
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes
PythonCstNode(the libcst backend) usable by recipes, as a step towards ADR 11 (libcst for Python, still a Proposal) and the "don't reinvent the wheel" point in #104 and #14. The RST backend stays the default, so existing recipes behave the same.The scope is deliberately minimal: only what is needed in #202 to not duplicate a lot of code, and to be able to actually use what is in the framework
Relates to #14 #104 #153 #188 #189 #261 #265 #266
Does not fully resolve any direct issue