-
Notifications
You must be signed in to change notification settings - Fork 4
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
support for str instead of Path #365
Comments
in the FileModel class, the filepath variable can have a check on the input for path. |
Is your feature request related to a problem? Please describe.
Currently, it is necessary to import Path whenever using hydrolib functions:
from pathlib import Path
Describe the solution you'd like
This is acceptable, but I can imagine it would be fairly easy to add support for plain strings also, by converting all strings to Path(str) in hydrolib. This saves a bit of a hassle. At least, if chosen not to add support, I would suggest to raise a more explanatory error than this:
AttributeError: 'str' object has no attribute 'is_absolute'
Instead, explicitly informing the user to wrap
Path()
around the provided string.The text was updated successfully, but these errors were encountered: