Use correct input arg type for _bestrelpath (#9238)

Closes #8990
This commit is contained in:
Harshna
2021-11-01 15:43:05 +00:00
committed by GitHub
parent f288afde1d
commit 9d17cebe64
4 changed files with 9 additions and 4 deletions

View File

@@ -685,6 +685,8 @@ def bestrelpath(directory: Path, dest: Path) -> str:
If no such path can be determined, returns dest.
"""
assert isinstance(directory, Path)
assert isinstance(dest, Path)
if dest == directory:
return os.curdir
# Find the longest common directory.