Add asserts for path variable types
This commit is contained in:
parent
dd2584c894
commit
c718c65849
|
@ -685,6 +685,8 @@ def bestrelpath(directory: Path, dest: Path) -> str:
|
||||||
|
|
||||||
If no such path can be determined, returns dest.
|
If no such path can be determined, returns dest.
|
||||||
"""
|
"""
|
||||||
|
assert isinstance(directory, Path)
|
||||||
|
assert isinstance(dest, Path)
|
||||||
if dest == directory:
|
if dest == directory:
|
||||||
return os.curdir
|
return os.curdir
|
||||||
# Find the longest common directory.
|
# Find the longest common directory.
|
||||||
|
|
Loading…
Reference in New Issue