Fix issues found by CI on Gitea runner

- cli.py: remove redundant cast to str (mypy strict, click 8.5+ types prompt);
  annotate prompt result explicitly
- test_storage.py: use now-relative timestamps instead of hardcoded 2026-08
  dates so history-filter tests do not rot over time
- add Gitea Actions CI workflow (.gitea/workflows/ci.yml)
This commit is contained in:
2026-09-03 12:03:14 +03:00
parent f95223b88b
commit 6caa021824
3 changed files with 49 additions and 7 deletions
+4 -3
View File
@@ -3,7 +3,6 @@
from __future__ import annotations
from pathlib import Path
from typing import cast
import click
@@ -49,10 +48,12 @@ def _prompt_str(
default_note: str = "(Enter — оставить)",
) -> str:
prompt = f"{label} [{current or 'пусто'}] {default_note}: "
value = click.prompt(prompt, default="", hide_input=hide_input, show_default=False)
value: str = click.prompt(
prompt, default="", hide_input=hide_input, show_default=False
)
if value == "":
return current
return cast(str, value)
return value
@click.group()