We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c060d3b commit 70b5953Copy full SHA for 70b5953
1 file changed
src/pathseq/_base.py
@@ -268,7 +268,7 @@ def relative_to(self, other: Segment) -> Self:
268
if other == str(self):
269
raise ValueError("Cannot make a path sequence relative to itself")
270
271
- return type(self)(self._path.relative_to(other))
+ return self.with_segments(self._path.relative_to(other))
272
273
def with_name(self, name: str) -> Self:
274
"""Return a new sequence with the :attr:`~.name` changed.
0 commit comments