Skip to content

Commit e65b28c

Browse files
committed
Fix protocol constants checker import path
1 parent 17a9dd9 commit e65b28c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/check_protocol_constants.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33

44
from __future__ import annotations
55

6+
import sys
67
from pathlib import Path
78

8-
from scripts.lib.protocol_constants import (
9+
ROOT = Path(__file__).resolve().parents[1]
10+
if str(ROOT) not in sys.path:
11+
sys.path.insert(0, str(ROOT))
12+
13+
from scripts.lib.protocol_constants import ( # noqa: E402
914
CANONICAL_RELATION_TYPES,
1015
VERDICT_LEVELS,
1116
)
1217

13-
ROOT = Path(__file__).resolve().parents[1]
1418
ENUMS = ROOT / 'protocol' / 'enums.md'
1519
LINK_TYPES = ROOT / 'protocol' / 'link-types.md'
1620
CEDV_SCHEMA = ROOT / 'protocol' / 'cedv' / 'canonical-object-schema-v1.md'

0 commit comments

Comments
 (0)