mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-02-06 18:56:48 +00:00
feat: transcript restart script (#742)
* transcript restart script * fix tests? * remove useless comment --------- Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
This commit is contained in:
10
server/reflector/utils/match.py
Normal file
10
server/reflector/utils/match.py
Normal file
@@ -0,0 +1,10 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user