-
Notifications
You must be signed in to change notification settings - Fork 56
feat: PathLike support throughout #4558
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds PathLike support throughout the library to improve usability with pathlib.Path objects. The change introduces a PathType type alias and updates function parameters to accept path-like objects in addition to strings.
- Introduces PathType type alias for path parameters
- Updates function signatures to use PathType instead of str for path parameters
- Maintains backward compatibility while enabling pathlib.Path usage
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
12f41a8 to
b9cf0c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
I love qualified imports
Context
Currently everything is typed as a str for Path but can still work in some places. This PR adds support for Paths I think everywhere in the public API
Change Summary
Gone through the library to find anything with path in it and update them to support os.fspath calls
Rationale
It makes things a lot nicer to use if you can use pathlib.Path
Impact
I don't think there's a big impact to anyone