Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RF: Change File and Directory to aliases of Path #651

Closed
wants to merge 1 commit into from

Conversation

effigies
Copy link
Contributor

@effigies effigies commented May 5, 2023

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.

@ghisvail
Copy link
Collaborator

ghisvail commented May 6, 2023

Just out of curiosity, why can't File and Directory be aliases to os.PathLike?

@effigies
Copy link
Contributor Author

effigies commented May 6, 2023

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.

@effigies
Copy link
Contributor Author

effigies commented May 9, 2023

FWIW, we might be able to go back to NewType after the next typing_extensions release: python/typing_extensions#156

@effigies effigies closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants