Annotate prompt result as str (works with old and new click/mypy)

This commit is contained in:
2026-09-03 11:34:16 +03:00
parent 8a770d18a7
commit 8598f2711a
+3 -1
View File
@@ -48,7 +48,9 @@ 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 value