Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
_common: make as_file return the real file on os.PathLike
We currently have custom handling for pathlib.Path, but that means that custom readers that do not using pathlib.Path will have their traversables copied to a temporary directory in as_file, which can be an expensive operation. By adding a dispatch for os.PathLike, we extend this behavior for all path-like objects. Signed-off-by: Filipe Laíns <[email protected]>
- Loading branch information