Open asvarga-sedaro opened 4 months ago
Hi @asvarga-sedaro!
Thank you for your pull request and welcome to our community.
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!
Attention: Patch coverage is 59.09091%
with 9 lines
in your changes missing coverage. Please review.
Project coverage is 91.23%. Comparing base (
72701e4
) to head (8767302
). Report is 2 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
libcst/_nodes/internal.py | 60.00% | 6 Missing :warning: |
libcst/_nodes/module.py | 57.14% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary
Enables generating code directly into files:
rather than
It does this with a subclass of
CodegenState
that avoids building in memory:tokens: List[str]
field ofCodegenState
"".join(state.tokens)
string of codeTest Plan
hatch run test
passesNotes
CodegenState.pop_trailing_newline()
isn't supported because the token is already written to the file. this is fixable if desired.