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

New type hints prevent passing PathLib Path to load(...) #2099

Closed
friggog opened this issue Dec 20, 2023 · 1 comment
Closed

New type hints prevent passing PathLib Path to load(...) #2099

friggog opened this issue Dec 20, 2023 · 1 comment

Comments

@friggog
Copy link
Contributor

friggog commented Dec 20, 2023

The Loadable type is Union[str, IO] but this gives a type error if passing Path from pathlib even though this is explicitly supported in the code.

Ideally the Loadable type would be something like Union[str, Path, IO] to resolve this

@mikedh
Copy link
Owner

mikedh commented Jan 18, 2024

Thanks for the fix!

@mikedh mikedh closed this as completed Jan 18, 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

No branches or pull requests

2 participants