symfonic.devtools.archcheck.model¶
model ¶
Shared value types for the architecture rule checks.
ImportRecord
dataclass
¶
One import statement found in a module.
ModuleInfo
dataclass
¶
ModuleInfo(name: str, path: Path, line_count: int, imports: tuple[ImportRecord, ...] = (), dunder_all: tuple[str, ...] | None = None, is_package: bool = False)
Static facts about one Python module in the scanned tree.
Violation
dataclass
¶
Violation(rule: str, message: str, modules: tuple[str, ...] = tuple(), edge: tuple[str, str] | None = None)
One architecture-rule violation.
modules lists every module implicated (one for most rules, the whole
strongly connected component for cycles); the exception registry matches
against this tuple.
edge is the (importer, imported) pair for the rules that are about
one import statement. It exists because modules cannot express them:
an import rule records modules=(importer,), so a waiver matched on
modules alone waives every edge that importer will ever grow, not the
one edge that was reviewed. The registry refuses such a waiver
(registry-hygiene) and requires the edge instead.