Closed effigies closed 1 month ago
Just out of curiosity, why can't File
and Directory
be aliases to os.PathLike
?
Maybe we can. As a protocol, they're not instantiable, so I didn't want to add the complication, but maybe that will help us be more careful.
FWIW, we might be able to go back to NewType
after the next typing_extensions
release: https://github.com/python/typing_extensions/issues/156
This attempts to replace File/Directory with TypeAliases, which I think is probably the only reasonable way to make Pydra type-checkable.
The File/Directory stuff is pretty magical. Something somewhere is changing the
output_dir
after using it to do input mapping when running container tasks, but I can't figure out where and I've run out of time to spend on this. Possibly someone else will see it.