Skip to content

Commit

Permalink
Also strip file suffix from strings when specified
Browse files Browse the repository at this point in the history
  • Loading branch information
nx10 committed Sep 19, 2024
1 parent 38e7f1b commit a849101
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/styx/backend/python/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ def _py_get_val(
raise Exception(f"Output path template replacements cannot be lists. ({param.param.name})")

if isinstance(param, ir.IStr):
for suffix in output_param_reference.file_remove_suffixes:
substitute += f".removesuffix({as_py_literal(suffix)})"
return substitute

if isinstance(param, (ir.IInt, ir.IFloat)):
Expand Down

0 comments on commit a849101

Please sign in to comment.