Improve typing for is_relative_to

This commit is contained in:
Matthias 2023-07-25 20:07:44 +02:00
parent 4ce95dd1c3
commit e39af17207

View File

@ -30,7 +30,7 @@ async def ui_version():
}
def is_relative_to(path, base) -> bool:
def is_relative_to(path: Path, base: Path) -> bool:
# Helper function simulating behaviour of is_relative_to, which was only added in python 3.9
try:
path.relative_to(base)