MarkSpan
Base classes
| Name |
Children |
Inherits |
_Box framesheet.models Optional box ``x, y, w, h`` (all four or none), normalized 0-1 unless ``frame``. |
|
|
⋔ Inheritance diagram
graph TD
940457691["models.MarkSpan"]
263270598["models._Box"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
263270598 --> 940457691
3879467795 --> 263270598
2751680898 --> 3879467795
🛈 DocStrings
Bases: _Box
A labelled time range, e.g. a caption; the optional box is its screen area.
Source code in src/framesheet/models.py
| class MarkSpan(_Box):
"""A labelled time range, e.g. a caption; the optional box is its screen area."""
model_config = ConfigDict(extra="forbid", strict=True)
start: float = Field(ge=0)
end: float = Field(ge=0)
label: str
kind: str | None = None
"""Free-form, e.g. ``caption``."""
@model_validator(mode="after")
def _ordered(self) -> Any:
if self.end < self.start:
msg = "end must be >= start"
raise ValueError(msg)
return self
|
kind
class-attribute
instance-attribute
:fa-brands-github: Show source on GitHub