From d1b62a38d53332facdeeeec3f0a3c620f2a01083 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Mon, 13 Apr 2026 07:31:44 -0700 Subject: [PATCH] Compact find command in grafana-sidecar container.py Use sh -c with implicit string concatenation to keep the find command readable as a single shell expression. Co-Authored-By: Claude Opus 4.6 (1M context) --- containers/grafana-sidecar/container.py | 36 +++++-------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/containers/grafana-sidecar/container.py b/containers/grafana-sidecar/container.py index 9c789a5..5e090cf 100644 --- a/containers/grafana-sidecar/container.py +++ b/containers/grafana-sidecar/container.py @@ -34,35 +34,13 @@ async def build(src: dagger.Directory) -> dagger.Container: .with_exec([".venv/bin/pip", "install", "--no-cache-dir", "."]) .with_exec( [ - "find", - "/app/.venv", - "(", - "-type", - "d", - "-a", - "-name", - "test", - "-o", - "-name", - "tests", - ")", - "-o", - "(", - "-type", - "f", - "-a", - "-name", - "*.pyc", - "-o", - "-name", - "*.pyo", - ")", - "-exec", - "rm", - "-rf", - "{}", - "+", - ], + "sh", + "-c", + "find /app/.venv" + " \\( -type d -a -name test -o -name tests \\)" + " -o \\( -type f -a -name '*.pyc' -o -name '*.pyo' \\)" + " -exec rm -rf {} +", + ] ) )