swansonk14/typed-argument-parser

[Feature request] Have `Tap.save` accept a `Path` variable from `pathlib`

chen-yingfa opened this issue · 1 comments

pathlib has been introduced since 3.4, and is much more convenient than strings in managing system paths. But now the save function still raise type error when passing a Path variable.

Workaround for now: use args.save(str(a_path_var))

Hi @donny-chan,

Thank you for bringing this to our attention! We agree and have made the fix in this commit: d26f0b8. We changed the type of all paths from str to Union[str, os.PathLike]. This fix will be included in the next release.

Best,
Jesse and Kyle