13 lines
254 B
Python
13 lines
254 B
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
import sys
|
||
|
|
from pathlib import Path
|
||
|
|
|
||
|
|
REPO_ROOT = Path(__file__).resolve().parents[3]
|
||
|
|
|
||
|
|
|
||
|
|
def ensure_repo_root_on_syspath() -> None:
|
||
|
|
root = str(REPO_ROOT)
|
||
|
|
if root not in sys.path:
|
||
|
|
sys.path.insert(0, root)
|