From 4848c63796254a589c3a6908edecb49ec61a5aca Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 20 Mar 2025 11:41:46 +0530 Subject: [PATCH] Use cast() instead of type: ignore --- kitty/options/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/options/utils.py b/kitty/options/utils.py index 4f401af41..caa3391d7 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -754,7 +754,8 @@ def active_tab_title_template(x: str) -> str | None: def text_fg_override_threshold(x: str) -> tuple[float, Literal['%', 'ratio']]: - return number_with_unit(x, '%', 'ratio') # type: ignore + val, unit = number_with_unit(x, '%', 'ratio') + return val, cast(Literal['%', 'ratio'], unit) ClearOn = Literal['next', 'focus']