def convert_config(config_name, config_value):
    """Convert the values from config and original set_from_args to the correct type."""
    ret = config_value
    if config_name.lower() == "warn_error_options" and type(config_value) == dict:
        normalize_warn_error_options(ret)
        ret = WarnErrorOptionsV2(
            error=config_value.get("error", []),
            warn=config_value.get("warn", []),
            silence=config_value.get("silence", []),
            valid_error_names=ALL_EVENT_NAMES,
        )
    return ret
Convert the values from config and original set_from_args to the correct type.
core/dbt/cli/flags.py