{"record":{"id":"5d702338d7de5ffc","repo":"kovidgoyal/kitty","slug":"jt-is-not-a-valid-jump-type-for-a-linear-easing","errorCode":null,"errorMessage":"{jt} is not a valid jump type for a linear easing function","messagePattern":"(.+?) is not a valid jump type for a linear easing function","errorType":"validation","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"kitty/options/utils.py","lineNumber":1719,"sourceCode":"                add_point(y, percent(points[1]))\n                add_point(y, percent(points[2]))\n            else:\n                raise ValueError(f'{r} has too many points for a linear easing curve parameter')\n        balance(1)\n        return cls(type='linear', linear_x=tuple(xaxis), linear_y=tuple(yaxis))\n\n    @classmethod\n    def steps(cls, params: str) -> 'EasingFunction':\n        parts = params.replace(',', ' ').split()\n        jump_type: JumpTypes = 'end'\n        if len(parts) == 2:\n            n = int(parts[0])\n            jt = parts[1]\n            mapping: dict[str, JumpTypes] = {'jump-start': 'start', 'start': 'start', 'end': 'end', 'jump-end': 'end', 'jump-none': 'none', 'jump-both': 'both'}\n            try:\n                jump_type = mapping[jt.lower()]\n            except KeyError:\n                raise KeyError(f'{jt} is not a valid jump type for a linear easing function')\n            if jump_type == 'none':\n                n = max(2, n)\n            else:\n                n = max(1, n)\n        else:\n            n = max(1, int(parts[0]))\n        return cls(type='steps', jump_type=jump_type, num_steps=n)\n\n\ndef 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","sourceCodeStart":1701,"sourceCodeEnd":1737,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L1701-L1737","documentation":"For a steps() easing with two parameters, the second must be a jump type from {'jump-start','start','end','jump-end','jump-none','jump-both'} (case-insensitive); anything else raises KeyError.","triggerScenarios":"'steps(4, middle)' or 'steps(3, both-ends)' in an animation spec — unrecognized jump term names.","commonSituations":"Confusing kitty's/CSS steps() jump-term vocabulary, typos, or using SVG-style easing names.","solutions":["Use one of: jump-start, start, end, jump-end, jump-none, jump-both","Omit the jump type to default to end behavior"],"exampleFix":"# before\ncursor_blink_interval 0.5:steps(4, middle)\n# after\ncursor_blink_interval 0.5:steps(4, jump-end)","handlingStrategy":"type-guard","validationCode":"JT = {'jump-start','start','end','jump-end','jump-none','jump-both'}\ndef valid_jump_type(jt: str) -> bool:\n    return jt.lower() in JT","typeGuard":"def is_valid_jump_type(jt: str) -> bool:\n    return jt.lower() in {'jump-start','start','end','jump-end','jump-none','jump-both'}","tryCatchPattern":null,"preventionTips":["Use CSS jump-term names exactly"],"tags":["kitty","config","animation","easing","enum"],"backgroundTag":"enum-value-invalid","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}