diff --git a/kitty/conf/generate.py b/kitty/conf/generate.py index 247972813..f522f37de 100644 --- a/kitty/conf/generate.py +++ b/kitty/conf/generate.py @@ -120,6 +120,8 @@ def generate_class(defn: Definition, loc: str) -> Tuple[str, str]: tc_imports.add((func.__module__, func.__name__)) defval = repr(func(option.defval_as_string)) + if len(defval) > 100: + defval += ' # noqa' if option.macos_defval is not unset: md = repr(func(option.macos_defval)) defval = f'{md} if is_macos else {defval}' diff --git a/kitty/options/parse.py b/kitty/options/parse.py index 2fba9509a..9f291ff0f 100644 --- a/kitty/options/parse.py +++ b/kitty/options/parse.py @@ -1030,7 +1030,7 @@ class Parser: ans['macos_hide_from_tasks'] = to_bool(val) def macos_menubar_title_max_length(self, val: str, ans: typing.Dict[str, typing.Any]) -> None: - ans['macos_menubar_title_max_length'] = int(val) + ans['macos_menubar_title_max_length'] = positive_int(val) def macos_option_as_alt(self, val: str, ans: typing.Dict[str, typing.Any]) -> None: ans['macos_option_as_alt'] = macos_option_as_alt(val) diff --git a/kitty/options/types.py b/kitty/options/types.py index d002d37a1..d9a5e005e 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -517,7 +517,7 @@ class Options: listen_on: str = 'none' macos_custom_beam_cursor: bool = False macos_hide_from_tasks: bool = False - macos_menubar_title_max_length: int = -1 + macos_menubar_title_max_length: int = 0 macos_option_as_alt: int = 0 macos_quit_when_last_window_closed: bool = False macos_show_window_title_in: choices_for_macos_show_window_title_in = 'all' @@ -573,7 +573,7 @@ class Options: update_check_interval: float = 24.0 url_color: Color = Color(0, 135, 189) url_excluded_characters: str = '' - url_prefixes: typing.Tuple[str, ...] = ('file', 'ftp', 'ftps', 'gemini', 'git', 'gopher', 'http', 'https', 'irc', 'ircs', 'kitty', 'mailto', 'news', 'sftp', 'ssh') + url_prefixes: typing.Tuple[str, ...] = ('file', 'ftp', 'ftps', 'gemini', 'git', 'gopher', 'http', 'https', 'irc', 'ircs', 'kitty', 'mailto', 'news', 'sftp', 'ssh') # noqa url_style: int = 3 visual_bell_color: typing.Optional[kitty.fast_data_types.Color] = None visual_bell_duration: float = 0