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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user