(base_type: Type, pattern: str)
base_type should be a typing.NewType that should always have the given
    regex pattern. That means that its underlying type ('__supertype__') had
    better be a str!
base_type should be a typing.NewType that should always have the given
    regex pattern. That means that its underlying type ('__supertype__') had
    better be a str!
base_type should be a typing . NewType that should always have the given regex pattern . That means that its underlying type ( __supertype__ ) had better be a str!
def register_pattern(base_type: Type, pattern: str) -> None:
    """base_type should be a typing.NewType that should always have the given
    regex pattern. That means that its underlying type ('__supertype__') had
    better be a str!
    """

    class PatternEncoder(FieldEncoder):
        @property
        def json_schema(self):
            return {"type": "string", "pattern": pattern}

    dbtClassMixin.register_field_encoders({base_type: PatternEncoder()})
def register_pattern ( base_type : Type , pattern : str ) -> None : class PatternEncoder ( FieldEncoder ) : @ property def json_schema ( self ) : return { "type" : "string" , "pattern" : pattern } dbtClassMixin . register_field_encoders ( { base_type : PatternEncoder ( ) } )