diff --git a/kitty/options/types.py b/kitty/options/types.py index 3079bc7dd..0949ccc83 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -614,7 +614,7 @@ class Options: term: str = 'xterm-kitty' terminfo_type: choices_for_terminfo_type = 'path' text_composition_strategy: str = 'platform' - text_fg_override_threshold: tuple[float, str] = (0.0, '%') + text_fg_override_threshold: tuple[float, typing.Literal['%', 'ratio']] = (0.0, '%') touch_scroll_multiplier: float = 1.0 transparent_background_colors: tuple[tuple[kitty.fast_data_types.Color, float], ...] = () undercurl_style: choices_for_undercurl_style = 'thin-sparse' diff --git a/kitty/options/utils.py b/kitty/options/utils.py index f468c54fa..4f401af41 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -753,8 +753,8 @@ def active_tab_title_template(x: str) -> str | None: return None if x == 'none' else x -def text_fg_override_threshold(x: str) -> tuple[float, str]: - return number_with_unit(x, '%', 'ratio') +def text_fg_override_threshold(x: str) -> tuple[float, Literal['%', 'ratio']]: + return number_with_unit(x, '%', 'ratio') # type: ignore ClearOn = Literal['next', 'focus']