mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 02:02:14 +02:00
Use literal type for text_fg_override_threshold
This commit is contained in:
2
kitty/options/types.py
generated
2
kitty/options/types.py
generated
@@ -614,7 +614,7 @@ class Options:
|
|||||||
term: str = 'xterm-kitty'
|
term: str = 'xterm-kitty'
|
||||||
terminfo_type: choices_for_terminfo_type = 'path'
|
terminfo_type: choices_for_terminfo_type = 'path'
|
||||||
text_composition_strategy: str = 'platform'
|
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
|
touch_scroll_multiplier: float = 1.0
|
||||||
transparent_background_colors: tuple[tuple[kitty.fast_data_types.Color, float], ...] = ()
|
transparent_background_colors: tuple[tuple[kitty.fast_data_types.Color, float], ...] = ()
|
||||||
undercurl_style: choices_for_undercurl_style = 'thin-sparse'
|
undercurl_style: choices_for_undercurl_style = 'thin-sparse'
|
||||||
|
|||||||
@@ -753,8 +753,8 @@ def active_tab_title_template(x: str) -> str | None:
|
|||||||
return None if x == 'none' else x
|
return None if x == 'none' else x
|
||||||
|
|
||||||
|
|
||||||
def text_fg_override_threshold(x: str) -> tuple[float, str]:
|
def text_fg_override_threshold(x: str) -> tuple[float, Literal['%', 'ratio']]:
|
||||||
return number_with_unit(x, '%', 'ratio')
|
return number_with_unit(x, '%', 'ratio') # type: ignore
|
||||||
|
|
||||||
|
|
||||||
ClearOn = Literal['next', 'focus']
|
ClearOn = Literal['next', 'focus']
|
||||||
|
|||||||
Reference in New Issue
Block a user