{"record":{"id":"59c1c52622f1b007","repo":"kovidgoyal/kitty","slug":"invalid-paste-actions-q-s-ignoring","errorCode":null,"errorMessage":"Invalid paste actions: {q - s}, ignoring","messagePattern":"Invalid paste actions: (.+?), ignoring","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/utils.py","lineNumber":1202,"sourceCode":"def underline_exclusion(x: str) -> tuple[float, Literal['', 'px', 'pt']]:\n    try:\n        return float(x), ''\n    except Exception:\n        unit: Literal['pt', 'px'] = x[-2:]  # type: ignore\n        if unit not in ('px', 'pt'):\n            raise ValueError(f'Invalid underline_exclusion with unrecognized unit: {x}')\n        try:\n            val = float(x[:-2])\n        except Exception:\n            raise ValueError(f'Invalid underline_exclusion with non numeric value: {x}')\n        return val, unit\n\n\ndef paste_actions(x: str) -> frozenset[str]:\n    s = frozenset({'quote-urls-at-prompt', 'confirm', 'filter', 'confirm-if-large', 'replace-dangerous-control-codes', 'replace-newline', 'no-op'})\n    q = frozenset(x.lower().split(','))\n    if not q.issubset(s):\n        raise ValueError(f'Invalid paste actions: {q - s}, ignoring')\n    return q\n\n\ndef action_alias(val: str) -> Iterable[tuple[str, str]]:\n    parts = val.split(maxsplit=1)\n    if len(parts) > 1:\n        alias_name, rest = parts\n        yield alias_name, rest\n\n\nkitten_alias = action_alias\n\n\ndef symbol_map_parser(val: str, min_size: int = 2) -> Iterable[tuple[tuple[int, int], str]]:\n    parts = val.split()\n\n    if len(parts) < min_size:\n        raise ValueError('must have codepoints AND font name')","sourceCodeStart":1184,"sourceCodeEnd":1220,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L1184-L1220","documentation":"kitty validates paste_actions as a comma-separated subset of a fixed frozenset of allowed action names; unknown tokens cause this ValueError listing the invalid ones.","triggerScenarios":"Setting paste_actions to include tokens not in {'quote-urls-at-prompt','confirm','filter','confirm-if-large','replace-dangerous-control-codes','replace-newline','no-op'}, e.g. 'confirm, sanitize' or a misspelled name.","commonSituations":"Misspelling an action, using an action removed/renamed between kitty versions, or adding spaces/extra tokens.","solutions":["Correct the action name to one of the allowed values","Check the allowed list in the error/kitty docs for your kitty version","Split multiple actions with commas and no invalid extras"],"exampleFix":"# before\npaste_actions confirm, sanitize\n# after\npaste_actions confirm, filter","handlingStrategy":"type-guard","validationCode":"ALLOWED = {'quote-urls-at-prompt','confirm','filter','confirm-if-large','replace-dangerous-control-codes','replace-newline','no-op'}\ndef valid_paste_actions(v: str) -> bool:\n    return set(map(str.lower, v.split(','))) <= ALLOWED","typeGuard":"def is_valid_paste_actions(v: str) -> bool:\n    ALLOWED = {'quote-urls-at-prompt','confirm','filter','confirm-if-large','replace-dangerous-control-codes','replace-newline','no-op'}\n    return bool(v) and set(map(str.lower, v.split(','))) <= ALLOWED","tryCatchPattern":null,"preventionTips":["Copy allowed names from the option docs of your kitty version"],"tags":["kitty","config","paste","validation"],"backgroundTag":"enum-value-invalid","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}