It's not what you were asking for (class that can't be subclassed), but `typing` has an `assert_never` to check exhaustiveness:
https://typing.readthedocs.io/en/latest/source/unreachable.h...
https://typing.readthedocs.io/en/latest/source/unreachable.h...
assert False, "This is unreachable."
in my code until now.