Ejemplo n.º 1
0
def check_language(v):
    if v not in all_languages:
        raise schema.ValidationError(
            'Expected {} to be in {!r}'.format(v, all_languages), )
Ejemplo n.º 2
0
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), )