mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Replace jsonschema with better error messages
This commit is contained in:
parent
71bbdb5b4c
commit
cb8dd335f4
30 changed files with 1064 additions and 842 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue