2026-07-12 09:39:55 +01:00
|
|
|
import sys
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
2026-07-12 20:57:55 +01:00
|
|
|
# Make the repo root + `scripts/` importable so `plugins.violin_guard.*`
|
|
|
|
|
# resolves in tests, mirroring how the CLI adds SCRIPTS_DIR to sys.path.
|
2026-07-12 09:39:55 +01:00
|
|
|
_ROOT = Path(__file__).resolve().parent.parent
|
2026-07-12 09:39:55 +01:00
|
|
|
# Repo root so `plugins.violin_guard` resolves as a package.
|
|
|
|
|
if str(_ROOT) not in sys.path:
|
|
|
|
|
sys.path.insert(0, str(_ROOT))
|
2026-07-12 09:39:55 +01:00
|
|
|
_SCRIPTS = _ROOT / "scripts"
|
|
|
|
|
if str(_SCRIPTS) not in sys.path:
|
|
|
|
|
sys.path.insert(0, str(_SCRIPTS))
|