Replace jsonschema with better error messages

This commit is contained in:
Anthony Sottile 2017-03-05 18:06:11 -08:00
parent 71bbdb5b4c
commit cb8dd335f4
30 changed files with 1064 additions and 842 deletions

View file

@ -2,7 +2,6 @@ from __future__ import unicode_literals
import os.path
import jsonschema
import pytest
from pre_commit import parse_shebang
@ -24,14 +23,6 @@ def get_head_sha(dir):
return cmd_output('git', 'rev-parse', 'HEAD')[1].strip()
def is_valid_according_to_schema(obj, schema):
try:
jsonschema.validate(obj, schema)
return True
except jsonschema.exceptions.ValidationError:
return False
def cmd_output_mocked_pre_commit_home(*args, **kwargs):
# keyword-only argument
tempdir_factory = kwargs.pop('tempdir_factory')