Skip to content

Commit 352cb5b

Browse files
Danelegendclaude
andcommitted
style(executor_docker): use f-string for docker ps --format value
Replaces a string-concatenation expression with an f-string so the Go-template format string can be read in one go. The doubled braces (``{{{{`` / ``}}}}``) escape to literal ``{{`` / ``}}`` inside the f-string, matching Docker's template syntax. Output is byte-identical to the previous concatenation. Addresses review feedback on PR #31. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a9cbd51 commit 352cb5b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

code-interpreter/app/services/executor_docker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def reap_expired_sessions(self) -> int:
462462
"--filter",
463463
f"label=component={SESSION_COMPONENT_LABEL}",
464464
"--format",
465-
'{{.Names}}\t{{.Label "' + SESSION_EXPIRES_AT_KEY + '"}}',
465+
f'{{{{.Names}}}}\t{{{{.Label "{SESSION_EXPIRES_AT_KEY}"}}}}',
466466
]
467467
try:
468468
list_result = subprocess.run( # nosec B603

0 commit comments

Comments
 (0)