{"record":{"id":"493b41a346fc0f30","repo":"kovidgoyal/kitty","slug":"func-name-is-not-a-valid-easing-function","errorCode":null,"errorMessage":"{func_name} is not a valid easing function","messagePattern":"(.+?) is not a valid easing function","errorType":"validation","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"kitty/options/utils.py","lineNumber":1747,"sourceCode":"def parse_animation(spec: str, interval: float = -1.0) -> tuple[float, EasingFunction, EasingFunction]:\n    with suppress(Exception):\n        interval = float(spec)\n        return interval, EasingFunction(), EasingFunction()\n\n    m = [EasingFunction(), EasingFunction()]\n\n    def parse_func(func_name: str, params: str) -> None:\n        idx = 1 if m[0] else 0\n        if m[idx]:\n            raise ValueError(f'{spec} specified more than two easing functions')\n        if func_name == 'cubic-bezier':\n            m[idx] = EasingFunction.cubic_bezier(params)\n        elif func_name == 'linear':\n            m[idx] = EasingFunction.linear(params)\n        elif func_name == 'steps':\n            m[idx] = EasingFunction.steps(params)\n        else:\n            raise KeyError(f'{func_name} is not a valid easing function')\n\n    for match in re.finditer(r'([-+.0-9a-zA-Z]+)(?:\\(([^)]*)\\)){0,1}', spec):\n        func_name, params = match.group(1, 2)\n        if params:\n            parse_func(func_name, params)\n            continue\n        with suppress(Exception):\n            interval = float(func_name)\n            continue\n        if func_name == 'ease-in-out':\n            parse_func('cubic-bezier', '0.42, 0, 0.58, 1')\n        elif func_name == 'linear':\n            parse_func('cubic-bezier', '0, 0, 1, 1')\n        elif func_name == 'ease':\n            parse_func('cubic-bezier', '0.25, 0.1, 0.25, 1')\n        elif func_name == 'ease-out':\n            parse_func('cubic-bezier', '0, 0, 0.58, 1')\n        elif func_name == 'ease-in':","sourceCodeStart":1729,"sourceCodeEnd":1765,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L1729-L1765","documentation":"Inside a parameterized easing spec, only cubic-bezier, linear, and steps are recognized function names; any other name with parentheses raises KeyError.","triggerScenarios":"Specs like '0.5:spring(1,2)' or '0.5:ease-in-out(0.4)' — a function-style call with an unknown easing name.","commonSituations":"Assuming CSS's full easing vocabulary (e.g. spring, bounce) exists in kitty; using parentheses on named easings that take no params.","solutions":["Use cubic-bezier(), linear(), or steps() with parameters","Use bare named easings (ease, ease-in, etc.) without parentheses"],"exampleFix":"# before\ncursor_blink_interval 0.5:spring(1, 2)\n# after\ncursor_blink_interval 0.5:cubic-bezier(0.42, 0, 1, 1)","handlingStrategy":"type-guard","validationCode":"def valid_easing_fn(name: str) -> bool:\n    return name in ('cubic-bezier', 'linear', 'steps')","typeGuard":"def is_param_easing(name: str) -> bool:\n    return name in ('cubic-bezier', 'linear', 'steps')","tryCatchPattern":null,"preventionTips":["Only these three take parenthesized params"],"tags":["kitty","config","animation","easing"],"backgroundTag":"unknown-function-name","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}