Closed chen-yingfa closed 1 year ago
Hi @donny-chan,
Thank you for bringing this to our attention! We agree and have made the fix in this commit: https://github.com/swansonk14/typed-argument-parser/commit/d26f0b8be624b966635e40e0f3c3b4f8e0894b93. 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
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 aPath
variable.Workaround for now: use
args.save(str(a_path_var))