1
0
personal-data/git_time_tracker/data.py

20 lines
483 B
Python
Raw Normal View History

import dataclasses
import datetime
from collections.abc import Sequence
HIDDEN_LABEL_PREFIX = '__'
HIDDEN_LABEL_TOTAL = HIDDEN_LABEL_PREFIX + 'TOTAL'
@dataclasses.dataclass(frozen=True, order=True)
2024-10-13 13:05:55 +00:00
class ActivitySample:
labels: Sequence[str]
start_at: datetime.datetime | None
end_at: datetime.datetime | None
@dataclasses.dataclass(frozen=True, order=True)
2024-10-13 13:05:55 +00:00
class RealizedActivitySample(ActivitySample):
start_at: datetime.datetime
end_at: datetime.datetime