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

Support Path objects where filenames are used #77

Open
StokesMIDE opened this issue Jun 24, 2021 · 1 comment
Open

Support Path objects where filenames are used #77

StokesMIDE opened this issue Jun 24, 2021 · 1 comment
Labels
development Development issues: package deployment, project organization, etc. enhancement New feature or request

Comments

@StokesMIDE
Copy link
Member

In functions/methods that use a string to specify a path or filename, we should also support the use of pathlib.Path objects. For example, in Document.__init__(), isinstance(stream, (str, bytes, bytearray)) is used to identify a filename vs. a stream; we should add Path to that second argument, and that's about all we'd need to do.

In places where other code expects a string, we can cast to str to handle something that may either be a str or a Path.

@StokesMIDE StokesMIDE added enhancement New feature or request development Development issues: package deployment, project organization, etc. labels Jun 24, 2021
@StokesMIDE
Copy link
Member Author

Path objects for loading schemata were introduced as part of #103, but there are other places it could be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Development issues: package deployment, project organization, etc. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant