1
0
This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
git-time-tracker/git_time_tracker/data.py

20 lines
471 B
Python
Raw Permalink Normal View History

import dataclasses
import datetime
2024-08-25 21:41:42 +00:00
from collections.abc import Sequence
HIDDEN_LABEL_PREFIX = '__'
HIDDEN_LABEL_TOTAL = HIDDEN_LABEL_PREFIX + 'TOTAL'
2024-08-25 21:41:42 +00:00
@dataclasses.dataclass(frozen=True, order=True)
class WorkSample:
labels: Sequence[str]
start_at: datetime.datetime | None
end_at: datetime.datetime | None
2024-08-25 22:57:51 +00:00
@dataclasses.dataclass(frozen=True, order=True)
class RealizedWorkSample(WorkSample):
start_at: datetime.datetime
end_at: datetime.datetime