Новый раг

This commit is contained in:
2026-03-01 14:21:33 +03:00
parent 2728c07ba9
commit 1ef0b4d68c
95 changed files with 3145 additions and 927 deletions

View File

@@ -0,0 +1,27 @@
from __future__ import annotations
from dataclasses import dataclass, field
@dataclass(slots=True)
class Entrypoint:
entry_id: str
entry_type: str
framework: str
route_or_command: str
handler_symbol_id: str
path: str
start_line: int
end_line: int
metadata: dict = field(default_factory=dict)
class EntrypointDetectorRegistry:
def __init__(self, detectors: list) -> None:
self._detectors = detectors
def detect_all(self, *, path: str, symbols: list) -> list[Entrypoint]:
items: list[Entrypoint] = []
for detector in self._detectors:
items.extend(detector.detect(path=path, symbols=symbols))
return items