Dalsi vlna cisteni /remind od Claude
This commit is contained in:
@@ -27,7 +27,7 @@ def compute_fire_times(target_date: date, text: str, cfg: dict) -> list[datetime
|
||||
a config regardless of the date passed in.
|
||||
"""
|
||||
count = _parse_count(cfg.get("times_per_day"))
|
||||
start, end = _parse_window(cfg.get("window"))
|
||||
start, end = parse_window(cfg.get("window"))
|
||||
day_set = _parse_days(cfg["days"]) if cfg.get("days") is not None else None
|
||||
from_date = _parse_date(cfg["from"]) if cfg.get("from") is not None else None
|
||||
until_date = _parse_date(cfg["until"]) if cfg.get("until") is not None else None
|
||||
@@ -60,7 +60,7 @@ def _parse_count(raw: object) -> int:
|
||||
return raw
|
||||
|
||||
|
||||
def _parse_window(raw: object) -> tuple[int, int]:
|
||||
def parse_window(raw: object) -> tuple[int, int]:
|
||||
if not isinstance(raw, str) or "-" not in raw:
|
||||
raise ValueError(f"window must be 'HH:MM-HH:MM', got {raw!r}")
|
||||
start_str, end_str = raw.split("-", 1)
|
||||
|
||||
Reference in New Issue
Block a user