File size: 358 Bytes
11c11f8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | from __future__ import annotations
from pathlib import Path
PACKAGE_ROOT = Path(__file__).resolve().parent
REPO_ROOT = PACKAGE_ROOT.parent
DEFAULT_CONFIG_PATH = REPO_ROOT / "config.json"
def resolve_repo_path(path: str | Path) -> Path:
candidate = Path(path)
if candidate.is_absolute():
return candidate
return REPO_ROOT / candidate
|