(data_section, ref_section, section)
return {
        'dict': validate_section_dict,
        'dict_list': validate_section_dict_list,
    }[ref_section['type']](data_section, ref_section, section)
Validates a section (e.g. global, capture, etc.).
Validates a section (e.g. global, capture, etc.).
Validates a section ( e . g . global capture etc . ) .
def validate_section(data_section, ref_section, section):
    '''Validates a section (e.g. global, capture, etc.).'''
    if ref_section["required"] and data_section is None:
        return ValidationResult(False, f'Required section `{section}` not found.')
    return {
        'dict': validate_section_dict,
        'dict_list': validate_section_dict_list,
    }[ref_section['type']](data_section, ref_section, section)
def validate_section ( data_section , ref_section , section ) : if ref_section [ "required" ] and data_section is None : return ValidationResult ( False , f'Required section `{section}` not found.' ) return { 'dict' : validate_section_dict , 'dict_list' : validate_section_dict_list , } [ ref_section [ 'type' ] ] ( data_section , ref_section , section )