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