def check_language(v): if v not in all_languages: raise schema.ValidationError( 'Expected {} to be in {!r}'.format(v, all_languages), )
def check_type_tag(tag): if tag not in ALL_TAGS: raise schema.ValidationError( 'Type tag {!r} is not recognized. ' 'Try upgrading identify and pre-commit?'.format(tag), )