Skip to content

RenameAnnotation

Bases: AbstractAnnotation

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

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

newName: str class-attribute

from_json(json) staticmethod

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