mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Better project structure
This commit is contained in:
parent
f31f092f9b
commit
1746a97e24
52 changed files with 221 additions and 189 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import collections
|
||||
|
||||
def auto_namedtuple(classname='auto_namedtuple', **kwargs):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
- repo: git@github.com:pre-commit/pre-commit-hooks
|
||||
hooks:
|
||||
- id: pyflakes
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
import jsonschema
|
||||
import os
|
||||
import os.path
|
||||
import shutil
|
||||
|
|
@ -27,3 +27,10 @@ def copy_tree_to_path(src_dir, dest_dir):
|
|||
shutil.copytree(srcname, destname)
|
||||
else:
|
||||
shutil.copy(srcname, destname)
|
||||
|
||||
def is_valid_according_to_schema(obj, schema):
|
||||
try:
|
||||
jsonschema.validate(obj, schema)
|
||||
return True
|
||||
except jsonschema.exceptions.ValidationError:
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue