Skip to content

DescriptionAnnotation

Bases: AbstractAnnotation

Source code in src/library_analyzer/processing/annotations/model/_annotations.py
@dataclass
class DescriptionAnnotation(AbstractAnnotation):
    newDescription: str  # noqa: N815

    @staticmethod
    def from_dict(d: Any) -> DescriptionAnnotation:
        annotation = AbstractAnnotation.from_dict(d)
        return DescriptionAnnotation(
            annotation.target,
            annotation.authors,
            annotation.reviewers,
            annotation.comment,
            annotation.reviewResult,
            d["newDescription"],
        )

newDescription: str instance-attribute

__init__(target, authors, reviewers, comment, reviewResult, newDescription)

from_dict(d) staticmethod

Source code in src/library_analyzer/processing/annotations/model/_annotations.py
@staticmethod
def from_dict(d: Any) -> DescriptionAnnotation:
    annotation = AbstractAnnotation.from_dict(d)
    return DescriptionAnnotation(
        annotation.target,
        annotation.authors,
        annotation.reviewers,
        annotation.comment,
        annotation.reviewResult,
        d["newDescription"],
    )