Fix pyi_generator relative path determination (#2485)

This commit is contained in:
Masen Furer 2024-01-30 15:03:15 -08:00 committed by GitHub
parent 1d6da9010e
commit 2782c0fe3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,7 +95,9 @@ def _relative_to_pwd(path: Path) -> Path:
Returns:
The relative path.
"""
return path.relative_to(PWD)
if path.is_absolute():
return path.relative_to(PWD)
return path
def _git_diff(args: list[str]) -> str: