Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: autoconvert Path objects to str when passing to R or Julia scripts
  • Loading branch information
johanneskoester committed Sep 29, 2021
1 parent ee05315 commit 80ec513
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions snakemake/script.py
Expand Up @@ -184,6 +184,8 @@ def encode_value(cls, value):
return "NULL"
elif isinstance(value, str):
return repr(value)
elif isinstance(value, Path):
return repr(str(value))
elif isinstance(value, dict):
return cls.encode_dict(value)
elif isinstance(value, bool):
Expand Down Expand Up @@ -243,6 +245,8 @@ def encode_value(cls, value):
return "nothing"
elif isinstance(value, str):
return repr(value)
elif isinstance(value, Path):
return repr(str(value))
elif isinstance(value, dict):
return cls.encode_dict(value)
elif isinstance(value, bool):
Expand Down

0 comments on commit 80ec513

Please sign in to comment.