Skip to content

ResultDocstring

Source code in src/library_analyzer/processing/api/model/_docstring.py
@dataclass(frozen=True)
class ResultDocstring:
    type: str = ""
    description: str = ""

    @staticmethod
    def from_dict(d: dict[str, Any]) -> ResultDocstring:
        return ResultDocstring(**d)

    def to_dict(self) -> dict[str, Any]:
        return dataclasses.asdict(self)

description: str = '' class-attribute instance-attribute

type: str = '' class-attribute instance-attribute

__init__(type='', description='')

from_dict(d) staticmethod

Source code in src/library_analyzer/processing/api/model/_docstring.py
@staticmethod
def from_dict(d: dict[str, Any]) -> ResultDocstring:
    return ResultDocstring(**d)

to_dict()

Source code in src/library_analyzer/processing/api/model/_docstring.py
def to_dict(self) -> dict[str, Any]:
    return dataclasses.asdict(self)