Skip to content

Unsafe

If you take a closer look at a model inherited from the Exact model, there's a __unsafe_init__() function which allows you to skip all type checks.

However, if directly called, you'd get an error:

from exacting import Exact

class Person(Exact):
    name: str

Person.__unsafe_init__(name="Walter")
RuntimeError: Scope is not in unsafe()…
RuntimeError: Scope is not in unsafe(), canceled operation