Skip to content

Commit 2afd364

Browse files
committed
URLPath.__str__() uses __fspath__()
This is because real world usage converts `Path` instances into strings all the time for passing into other arguments. Prior to this change this would just point to a non-existent file.
1 parent 83793a0 commit 2afd364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

replicate/use.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def __fspath__(self) -> str:
307307
return str(self.__path__)
308308

309309
def __str__(self) -> str:
310-
return str(self.__path__)
310+
return self.__fspath__()
311311

312312
def __repr__(self) -> str:
313313
return f"<URLPath url={self.__url__!r} path={self.__path__!r}>"

0 commit comments

Comments
 (0)