Bases: AbstractAnnotation
Source code in src/library_analyzer/processing/annotations/model/_annotations.py
| @dataclass
class BoundaryAnnotation(AbstractAnnotation):
interval: Interval
@staticmethod
def from_dict(d: dict[str, Any]) -> BoundaryAnnotation:
annotation = AbstractAnnotation.from_dict(d)
return BoundaryAnnotation(
annotation.target,
annotation.authors,
annotation.reviewers,
annotation.comment,
annotation.reviewResult,
Interval.from_dict(d["interval"]),
)
def to_dict(self) -> dict[str, Any]:
return {
"target": self.target,
"authors": self.authors,
"reviewers": self.reviewers,
"comment": self.comment,
"reviewResult": self.reviewResult.value,
"interval": self.interval.to_dict(),
}
|
interval: Interval
instance-attribute
__init__(target, authors, reviewers, comment, reviewResult, interval)
from_dict(d)
staticmethod
Source code in src/library_analyzer/processing/annotations/model/_annotations.py
| @staticmethod
def from_dict(d: dict[str, Any]) -> BoundaryAnnotation:
annotation = AbstractAnnotation.from_dict(d)
return BoundaryAnnotation(
annotation.target,
annotation.authors,
annotation.reviewers,
annotation.comment,
annotation.reviewResult,
Interval.from_dict(d["interval"]),
)
|
to_dict()
Source code in src/library_analyzer/processing/annotations/model/_annotations.py
| def to_dict(self) -> dict[str, Any]:
return {
"target": self.target,
"authors": self.authors,
"reviewers": self.reviewers,
"comment": self.comment,
"reviewResult": self.reviewResult.value,
"interval": self.interval.to_dict(),
}
|