{"record":{"id":"6a26cd47105afc70","repo":"kovidgoyal/kitty","slug":"the-value-val-is-not-a-valid-choice-for-underlin","errorCode":null,"errorMessage":"The value {val} is not a valid choice for underline_hyperlinks","messagePattern":"The value (.+?) is not a valid choice for underline_hyperlinks","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/parse.py","lineNumber":1485,"sourceCode":"\n    def transparent_background_colors(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['transparent_background_colors'] = transparent_background_colors(val)\n\n    def undercurl_style(self, val: str, ans: dict[str, typing.Any]) -> None:\n        val = val.lower()\n        if val not in self.choices_for_undercurl_style:\n            raise ValueError(f\"The value {val} is not a valid choice for undercurl_style\")\n        ans[\"undercurl_style\"] = val\n\n    choices_for_undercurl_style = frozenset(('thin-sparse', 'thin-dense', 'thick-sparse', 'thick-dense'))\n\n    def underline_exclusion(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['underline_exclusion'] = underline_exclusion(val)\n\n    def underline_hyperlinks(self, val: str, ans: dict[str, typing.Any]) -> None:\n        val = val.lower()\n        if val not in self.choices_for_underline_hyperlinks:\n            raise ValueError(f\"The value {val} is not a valid choice for underline_hyperlinks\")\n        ans[\"underline_hyperlinks\"] = val\n\n    choices_for_underline_hyperlinks = frozenset(('hover', 'always', 'never'))\n\n    def update_check_interval(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['update_check_interval'] = float(val)\n\n    def url_color(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['url_color'] = to_color(val)\n\n    def url_excluded_characters(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['url_excluded_characters'] = python_string(val)\n\n    def url_prefixes(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['url_prefixes'] = url_prefixes(val)\n\n    def url_style(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['url_style'] = url_style(val)","sourceCodeStart":1467,"sourceCodeEnd":1503,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/parse.py#L1467-L1503","documentation":"underline_hyperlinks controls when hyperlinks are underlined and accepts hover, always, or never. The parser lowercases the value and raises ValueError for anything outside that set.","triggerScenarios":"Setting `underline_hyperlinks yes`, `underline_hyperlinks on-hover`, or a typo like `allways` in kitty.conf or via remote option setting.","commonSituations":"Assuming boolean semantics (yes/no) like other kitty options; writing 'on-hover' instead of 'hover'; typos.","solutions":["Use one of: hover, always, never","Replace boolean-style values: 'yes'→'always', 'no'→'never'","Check spelling after lowercasing"],"exampleFix":"# before\nunderline_hyperlinks yes\n# after\nunderline_hyperlinks always","handlingStrategy":"validation","validationCode":"value = value.lower()\nif value not in ('hover','always','never'):\n    raise SystemExit(f'bad underline_hyperlinks: {value}')","typeGuard":"def is_underline_hyperlinks(v: str) -> bool:\n    return v.lower() in ('hover','always','never')","tryCatchPattern":null,"preventionTips":["Not a boolean option: use hover/always/never","Avoid 'on-hover' spelling"],"tags":["kitty","config","validation","hyperlinks"],"backgroundTag":"config-invalid-choice","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}