Skip to content

Commit 094e21e

Browse files
realpython-botclaude
andcommitted
Unpack sandbox result instead of nesting quotes in f-string
Ruff and the CMS preflight disagreed on quote style for the nested f-string in compare.py. Unpacking the result avoids nested quotes, so the folder-level ruff.toml override is no longer needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f1f75ae commit 094e21e

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

‎python-sandbox/compare.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424

2525
print("3. Locked-down container:")
2626
result = run_untrusted(HOSTILE)
27-
if result["exit_code"] == 0:
28-
print(result["stdout"].strip())
27+
exit_code, stdout, stderr = result.values()
28+
if exit_code == 0:
29+
print(stdout.strip())
2930
else:
30-
print(f"Sandbox failed ({result["exit_code"]}): {result["stderr"]}")
31+
print(f"Sandbox failed ({exit_code}): {stderr}")

‎python-sandbox/ruff.toml‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)