pyproject-hooks icon indicating copy to clipboard operation
pyproject-hooks copied to clipboard

typing: allow PathLike objects in addition to strs

Open gotmax23 opened this issue 1 year ago • 0 comments

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: https://github.com/pypa/pyproject-hooks/pull/167

gotmax23 avatar Nov 01 '23 20:11 gotmax23