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

typing: allow PathLike objects in addition to strs #181

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gotmax23
Copy link

@gotmax23 gotmax23 commented Nov 1, 2023

Some projects use pathlib or other libraries to encapsulate file system paths instead of working with strs (or bytes) directly. These classes implement the os.PathLike interface which the functions in os.path support in addition to strs.

This changes all functions that accept paths to accept PathLike objects in addition to strings. The way the backend_path attribute is set in BuildBackendHookCaller.__init__() was also modified so the typing was correct.

Follow-up-to: #167

Some projects use pathlib or other libraries to encapsulate file system
paths instead of working with strs (or bytes) directly. These classes
implement the os.PathLike interface which the functions in `os.path`
support in addition to strs.

This changes all functions that accept paths to accept PathLike objects
in addition to strings. The way the backend_path attribute is set in
`BuildBackendHookCaller.__init__()` was also modified so the typing was
correct.
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.

None yet

1 participant