Skip to content

TodoAnnotation

Bases: AbstractAnnotation

Source code in library_analyzer/processing/annotations/model/_annotations.py
@dataclass
class TodoAnnotation(AbstractAnnotation):
    newTodo: str

    @staticmethod
    def from_json(json: Any) -> TodoAnnotation:
        annotation = AbstractAnnotation.from_json(json)
        return TodoAnnotation(
            annotation.target,
            annotation.authors,
            annotation.reviewers,
            annotation.comment,
            annotation.reviewResult,
            json["newTodo"],
        )

newTodo: str class-attribute

from_json(json) staticmethod

Source code in library_analyzer/processing/annotations/model/_annotations.py
@staticmethod
def from_json(json: Any) -> TodoAnnotation:
    annotation = AbstractAnnotation.from_json(json)
    return TodoAnnotation(
        annotation.target,
        annotation.authors,
        annotation.reviewers,
        annotation.comment,
        annotation.reviewResult,
        json["newTodo"],
    )