s1ngledoge's picture
upd
1c8d1ba
Raw
History Blame Contribute Delete
282 Bytes
from __future__ import annotations
import sys
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
def add_project_root_to_path() -> Path:
root = str(PROJECT_ROOT)
if root not in sys.path:
sys.path.insert(0, root)
return PROJECT_ROOT