Repository navigation
fix(python): make the resource management README snippet valid Python - #128
Open
LukasParke wants to merge 1 commit into
Open
LukasParke wants to merge 1 commit into
LukasParke wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
The Resource Management README section rendered `with` and `async with` blocks whose bodies contained only a comment, so copying the snippet raised an IndentationError. Add a `pass` statement after the placeholder comment in both async modes.
LukasParke
force-pushed
the
fix/python-resource-management-snippet
branch
from
October 21, 2026 19:13
9500d65 to
bc31e63
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
LukasParke
marked this pull request as ready for review
October 21, 2026 19:19
Contributor
|
Thank you @LukasParke for your contribution! |
2ynn
approved these changes
Oct 21, 2026
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.
Why
The Python README "Resource Management" section shows how to create the SDK via a context manager, but the
with ...:andasync with ...:blocks contain only a# Rest of application here...comment. A block whose body is only a comment is not valid Python, so copying the snippet raises:What changed
templates/templates/pythonv2/readme/resource-management.stmpl: emitpassafter the placeholder comment in the sync and async blocks, for bothasyncMode: bothandasyncMode: split.zSDKs/sdk-pythonv2/README.md: regenerated review SDK; the only change is the two addedpasslines in the Resource Management section..changesets/: patch changeset fordocs/pythonv2.No other target uses this template.
Testing
npm run format: no changes.make check-template-pythonv2: passed.TARGET=review make build-pythonv2: the only diff inzSDKs/is the twopasslines in the README.TARGET=primary make test-pythonv2: passed.asyncMode: split) and the primary README (asyncMode: both) and ranast.parseon each. Both parse now; the review block from before the change fails with theIndentationErrorabove.git diff --check: clean.Public-safety check
.claude/skills/public-repo-communication/SKILL.md).git diff --check.Summary by cubic
Fixes the Python Resource Management README snippet so copied code no longer raises an
IndentationError.The template's
withandasync withblocks contained only a comment, which is invalid Python. Adds apassstatement after the placeholder comment, regenerates the review SDK README, and adds a patch changeset fordocs/pythonv2. No other templates use this file.Written for commit bc31e63. Summary will update on new commits.