Skip to content

Commit a1e93ce

Browse files
fix: fix recent regression when printing remote storage output or log files (local path shown instead of query) (snakemake#3550)
<!--Add a description of your PR here--> ### QC <!-- Make sure that you can tick the boxes below. --> * [x] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [x] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved handling of IO file annotations, ensuring that files without specific flags are now properly annotated. - **Refactor** - Enhanced flexibility by making the label parameter optional in the annotation process. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent af69f9c commit a1e93ce

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/snakemake/io/fmt.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def fmt_iofile(f, as_input: bool = False, as_output: bool = False):
2020
f_str = f
2121
storage_phrase = ""
2222

23-
def annotate(f_str, label):
23+
def annotate(f_str, label=None):
2424
sep = ", " if label and storage_phrase else ""
2525
ann = f" ({label}{sep}{storage_phrase})" if label or storage_phrase else ""
2626
return f"{f_str}{ann}"
@@ -44,4 +44,6 @@ def annotate(f_str, label):
4444
return annotate(f_str, pattern)
4545
elif is_flagged(f, "checkpoint_target"):
4646
return TBDString()
47+
else:
48+
return annotate(f_str)
4749
return f

0 commit comments

Comments
 (0)