Skip to content

Commit b1c29fa

Browse files
fix: fix iofile formatting to always display the storage query if it is set, also in case of missing input exceptions (snakemake#3786)
### Description <!--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 * **New Features** * Formatted file references now clearly indicate when a file is in storage by appending “in storage” where applicable. * **Bug Fixes** * Standardized the return of formatted file paths: in non-input/output contexts, formatting now consistently returns the annotated string representation, ensuring predictable display and messaging across the app. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent dc8acf4 commit b1c29fa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/snakemake/io/fmt.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def fmt_iofile(f, as_input: bool = False, as_output: bool = False):
1414
elif as_output:
1515
storage_phrase = "send to storage"
1616
else:
17-
storage_phrase = ""
17+
storage_phrase = "in storage"
1818
f_str = f.storage_object.print_query
1919
else:
2020
f_str = f
@@ -46,4 +46,5 @@ def annotate(f_str, label=""):
4646
return TBDString()
4747
else:
4848
return annotate(f_str)
49-
return f
49+
else:
50+
return annotate(f_str)

0 commit comments

Comments
 (0)