lale/schema_simplifier.py
def enumValues(
    es: set_with_str_for_keys[Any], s: JsonSchema
) -> set_with_str_for_keys[Any]:
    """Given an enumeration set and a schema, return all the consistent values of the enumeration."""
    # TODO: actually check.  This should call the json schema validator
    ret = list()
    for e in es:
        try:
            always_validate_schema(e, s)
            ret.append(e)
        except jsonschema.ValidationError:
            logger.debug(
                f"enumValues: {e} removed from {es} because it does not validate according to {s}"
            )
    return set_with_str_for_keys(iter(ret))
Given an enumeration set and a schema, return all the consistent values of the enumeration.
Given an enumeration set and a schema, return all the consistent values of the enumeration.
Given an enumeration set and a schema return all the consistent values of the enumeration .
def enumValues(
    es: set_with_str_for_keys[Any], s: JsonSchema
) -> set_with_str_for_keys[Any]:
    ret = list()
    for e in es:
        try:
            always_validate_schema(e, s)
            ret.append(e)
        except jsonschema.ValidationError:
            logger.debug(
                f"enumValues: {e} removed from {es} because it does not validate according to {s}"
            )
    return set_with_str_for_keys(iter(ret))
def enumValues ( es : set_with_str_for_keys [ Any ] , s : JsonSchema ) -> set_with_str_for_keys [ Any ] : ret = list ( ) for e in es : try : always_validate_schema ( e , s ) ret . append ( e ) except jsonschema . ValidationError : logger . debug ( f"enumValues: {e} removed from {es} because it does not validate according to {s}" ) return set_with_str_for_keys ( iter ( ret ) )
Given an enumeration set and a schema, return all the consistent values of the enumeration.
Given an enumeration set and a schema return all the consistent values of the enumeration .
"""Given an enumeration set and a schema, return all the consistent values of the enumeration.""" # TODO: actually check.  This should call the json schema validator
es
set_with_str_for_keys[Any]
s
JsonSchema