Skip to content

Commit 7d2032a

Browse files
authored
upath.extensions: fix is_relative_to for extensions (#510)
1 parent a0adc0c commit 7d2032a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

upath/extensions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,8 @@ def relative_to( # type: ignore[override]
431431
)
432432

433433
def is_relative_to(self, other, /, *_deprecated) -> bool: # type: ignore[override]
434+
if not isinstance(other, str):
435+
other = vfspath(other)
434436
return self.__wrapped__.is_relative_to(other, *_deprecated)
435437

436438
def hardlink_to(self, target: ReadablePathLike) -> None:

0 commit comments

Comments
 (0)