Skip to content

fix(cli): preserve quotes in Python source commands - #31

Closed
xiehuanyi wants to merge 1 commit into
cased:mainfrom
xiehuanyi:fix/quote-python-inline-source
Closed

xiehuanyi wants to merge 1 commit into
cased:mainfrom
xiehuanyi:fix/quote-python-inline-source

Conversation

@xiehuanyi

Copy link
Copy Markdown

Python source read from stdin or --file fails when it contains ordinary single-quoted strings, such as print('hello'). The CLI wraps source in three shell quotes, so the shell strips the Python quotes before execution.

Pass the source as one argument using shlex.quote(). Both regressions run the generated command through a real local /bin/sh: they fail before the fix and print the original strings afterward.

Validation: 29 CLI cases and all 210 offline cases pass (1 credential-dependent skip, 30 integration cases deselected), plus full Ruff/Black checks. Mypy retains 57 existing advisory diagnostics, unchanged from base. No cloud sandbox was created.

AI assistance: Codex.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 18:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@xiehuanyi xiehuanyi closed this Oct 10, 2026
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.

2 participants