mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
* transcript restart script * fix tests? * remove useless comment --------- Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
11 lines
293 B
Python
11 lines
293 B
Python
from typing import NoReturn
|
|
|
|
|
|
def assert_exhaustiveness(x: NoReturn) -> NoReturn:
|
|
"""Provide an assertion at type-check time that this function is never called."""
|
|
raise AssertionError(f"Invalid value: {x!r}")
|
|
|
|
|
|
def absurd(x: NoReturn) -> NoReturn:
|
|
return assert_exhaustiveness(x)
|