Skip to content

RenameAnnotation

Bases: AbstractAnnotation

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

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

newName: str instance-attribute

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

from_dict(d) staticmethod

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