Files
claw-code/src/context.py

17 lines
435 B
Python
Raw Normal View History

from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
@dataclass(frozen=True)
class PortContext:
source_root: Path
tests_root: Path
assets_root: Path
def build_port_context(base: Path | None = None) -> PortContext:
root = base or Path(__file__).resolve().parent.parent
return PortContext(source_root=root / 'src', tests_root=root / 'tests', assets_root=root / 'assets')