Skip to content

Commit d01d0d0

Browse files
style: fix snakefmt formatting in Snakefile onstart block
Move standalone comment to inline to work around snakefmt bug where a comment between an if-block and continuation code gets re-indented non-idempotently on each format pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bc448d6 commit d01d0d0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

workflow/Snakefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ onstart:
4242
except Exception:
4343
pass
4444

45-
# Validate that key tools resolve to the pixi/conda environment
46-
conda_prefix = os.environ.get("CONDA_PREFIX", "")
45+
conda_prefix = os.environ.get("CONDA_PREFIX", "") # tool path validation
4746
repo_root = os.path.dirname(os.path.dirname(workflow.snakefile))
4847

4948
tools_to_check = [
@@ -68,9 +67,7 @@ onstart:
6867
continue
6968
tool_path = os.path.realpath(tool_path)
7069
if not any(
71-
tool_path.startswith(os.path.realpath(p))
72-
for p in allowed_prefixes
73-
if p
70+
tool_path.startswith(os.path.realpath(p)) for p in allowed_prefixes if p
7471
):
7572
logger.warning(
7673
f"Tool '{tool_name}' resolves to {tool_path}, which is outside "

0 commit comments

Comments
 (0)