Skip to content

docs(readme): fix syntax errors in StoryAgent and test snippets#5905

Merged
u9g merged 1 commit into
mainfrom
fix/readme-snippet-syntax
May 30, 2026
Merged

docs(readme): fix syntax errors in StoryAgent and test snippets#5905
u9g merged 1 commit into
mainfrom
fix/readme-snippet-syntax

Conversation

@u9g
Copy link
Copy Markdown
Contributor

@u9g u9g commented May 30, 2026

Summary

  • Add missing comma after the instructions= f-string in the StoryAgent.__init__ super().__init__(...) call — without it, Python raises SyntaxError at the next keyword argument (llm=).
  • Change async AgentSession(llm=llm) as sess: to async with AgentSession(llm=llm) as sess: in the testing snippet — the previous form is not valid Python.

Both snippets are copy-paste hazards: README fenced ```python blocks aren't executed in CI, so the errors went unnoticed.

Test plan

  • Copy the updated StoryAgent snippet into a file and verify it parses with python -c "import ast; ast.parse(open('f.py').read())".
  • Copy the updated test snippet and verify it parses.
  • (Optional follow-up) Add a CI step that runs py_compile over fenced ```python blocks in README.md to prevent regressions.

- Add missing comma after instructions= in StoryAgent.__init__ super() call
- Add missing 'with' in 'async AgentSession(...) as sess:' test snippet
@chenghao-mou chenghao-mou requested a review from a team May 30, 2026 18:28
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@u9g u9g merged commit c6a678d into main May 30, 2026
12 checks passed
@u9g u9g deleted the fix/readme-snippet-syntax branch May 30, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants