summaryrefslogtreecommitdiff
path: root/plugins/claude-security/scripts/lib/exhaustiveness.py
blob: fbdea3ff95f9a958b90970bada5a0a0eecc6fd61 (plain)
1
2
3
4
5
6
7
8
9
10
11
"""Closing a chain of tests over an enum or a Literal, so the type checker reports a value left
out."""

from __future__ import annotations

from typing import NoReturn


def unreachable(value: NoReturn) -> NoReturn:
    """Refuse a value the type checker has proven cannot occur."""
    raise AssertionError(value)