Repository navigation
Conversation
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Two documented examples raise SyntaxError if a reader copies them.
docs/sessions/memory.md: the Runner(...) call spreads "..." and then
sets memory_service= with no separating comma ("Perhaps you forgot a
comma"). Add the trailing comma, which also matches the pattern used by
the other snippets on the page.
docs/tutorials/multi-tool-agent.md: the Agent( call is never closed and
ends with a bare "..." placed after keyword arguments, so Python reports
both "'(' was never closed" and "positional argument follows keyword
argument". Close the call after the model argument; the surrounding text
("Your code should look something like") does not rely on the
placeholder.
Every Python fence on both pages now passes ast.parse.
AAliKKhan
force-pushed
the
fix/invalid-python-snippets
branch
from
October 19, 2026 11:51
a26a512 to
0e469f4
Compare
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.
What
Two documented Python examples raise
SyntaxErrorif a reader copies them.docs/sessions/memory.md...->...,(missing comma in a call)docs/tutorials/multi-tool-agent.md...-> closing)for the unclosedAgent(callWhy
docs/sessions/memory.mdTwo arguments with no separating comma:
Adding the trailing comma matches the shape used by the other
Runnerandservice snippets on the same page.
docs/tutorials/multi-tool-agent.mdTwo errors at once:
'(' was never closed, and - once you close it -positional argument follows keyword argument, because...is a positionalexpression placed after keyword arguments. The surrounding text is "Your code
should look something like", so the statement is simply closed after the model
argument rather than trying to keep an ellipsis that Python rejects there.
Verification
Every Python fence on both pages is extracted,
textwrap.dedent-ed and passedthrough
ast.parse(): all pass after the change (the two above are the onlyfailures before it).
mkdocs build --strictpasses.