def update_app_setting(setting, data):
    """
    Update app setting from the project configuration definition file.
    """
    kwargs = {}
    for key, value in data.items():
        if key == 'type':
            raise ValueError('Setting `type` attribute denied to update')
        kwargs[key] = value
    setting.update(**kwargs)
    return setting
