Skip to content

ResultDocstring

Source code in library_analyzer/processing/api/model/_api.py
@dataclass
class ResultDocstring:
    type: str
    description: str

    @staticmethod
    def from_json(json: Any) -> ResultDocstring:
        return ResultDocstring(
            json.get("type", ""),
            json.get("description", ""),
        )

    def to_json(self) -> Any:
        return {"type": self.type, "description": self.description}

description: str class-attribute

type: str class-attribute

from_json(json) staticmethod

Source code in library_analyzer/processing/api/model/_api.py
@staticmethod
def from_json(json: Any) -> ResultDocstring:
    return ResultDocstring(
        json.get("type", ""),
        json.get("description", ""),
    )

to_json()

Source code in library_analyzer/processing/api/model/_api.py
def to_json(self) -> Any:
    return {"type": self.type, "description": self.description}