Julian / Julian/Filesystems

Rename RelativePath.relative_to()?

Open
#26 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2
Forks
6
PR merge metrics
No merged PRs in 30d

Description

https://github.com/Julian/Filesystems/blob/427e565da044dd74728436fd0833deabd314e7c5/filesystems/_path.py#L95-L101

This just doesn't read properly to me. I expect `relative_to()` to take an absolute path and create a relative one. Even the docstring uses 'resolve' instead. Perhaps my reading of it is tainted by `pathlib` but I think it's separately reasonable.

https://docs.python.org/3.7/library/pathlib.html#pathlib.PurePath.relative_to

I'll propose `resolve()`. I'd also provide a default for the `path` parameter of `Path.cwd()`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.