from jedi.api.classes import Name
from pydantic import RootModel
from pydantic.dataclasses import dataclass


@dataclass(frozen=True, config={"arbitrary_types_allowed": True})
class Source:
    full_name: str
    definition: Name
    source_code: str


@dataclass(frozen=True)
class SourceList(RootModel):
    root: list[Source]
