1
0
personal-data/git_time_tracker/data.py
Jon Michael Aanes 4f851b21b5
All checks were successful
Test Python / Test (push) Successful in 31s
Merged git-time-tracker into personal-data
2024-10-13 14:32:51 +02:00

20 lines
471 B
Python

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)
class WorkSample:
labels: Sequence[str]
start_at: datetime.datetime | None
end_at: datetime.datetime | None
@dataclasses.dataclass(frozen=True, order=True)
class RealizedWorkSample(WorkSample):
start_at: datetime.datetime
end_at: datetime.datetime