@dataclass is the new final
But that's only checked by the type checker. At runtime you still need to do something like this to prevent subclassing:
class DontSubclassMe:
def __init_subclass__(self):
raise TypeError("Don't subclass me!")https://typing.readthedocs.io/en/latest/source/unreachable.h...
assert False, "This is unreachable."
in my code until now.