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

Handle all filenames with pathlib #18

Merged
merged 7 commits into from
Aug 23, 2023
Merged

Handle all filenames with pathlib #18

merged 7 commits into from
Aug 23, 2023

Conversation

dennisbrookner
Copy link
Member

Where appropriate, all file paths are now handled as pathlib.Path objects, rather than just strings. In addition to just being best practice, this carries the following advantages:

  • Easier validation that the provided files actually exist
  • Files can be provided either as filenames alongside the --input-dir flag, or as relative paths, or as absolute paths.
  • In theory, the package should now be Windows compatible? I have not tested this. At the very least, there are no longer any forward slashes hard-coded in!
  • Easier incorporation of file cleanup.

@dennisbrookner dennisbrookner merged commit cfc284d into main Aug 23, 2023
@dennisbrookner dennisbrookner deleted the paths branch August 23, 2023 16:13
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.

1 participant