mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 12:30:08 -06:00
Update some pre-commit hooks + some minor tweaks
This commit is contained in:
@@ -2,11 +2,12 @@ from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import argparse
|
||||
import jsonschema
|
||||
import jsonschema.exceptions
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
|
||||
import jsonschema
|
||||
import jsonschema.exceptions
|
||||
import yaml
|
||||
|
||||
from pre_commit.jsonschema_extensions import apply_defaults
|
||||
@@ -78,10 +79,6 @@ def get_run_function(filenames_help, validate_strategy, exception_cls):
|
||||
validate_strategy(filename)
|
||||
except exception_cls as e:
|
||||
print(e.args[0])
|
||||
# If there was an inner exception, print the stringified
|
||||
# version of that.
|
||||
if len(e.args) > 1:
|
||||
print(str(e.args[1]))
|
||||
retval = 1
|
||||
return retval
|
||||
return run
|
||||
|
||||
@@ -12,8 +12,8 @@ from pre_commit.clientlib.validate_config import load_config
|
||||
from pre_commit.jsonschema_extensions import remove_defaults
|
||||
from pre_commit.ordereddict import OrderedDict
|
||||
from pre_commit.repository import Repository
|
||||
from pre_commit.util import cwd
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.util import cwd
|
||||
|
||||
|
||||
class RepositoryCannotBeUpdatedError(RuntimeError):
|
||||
|
||||
@@ -5,8 +5,8 @@ import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
from pre_commit import git
|
||||
from pre_commit import color
|
||||
from pre_commit import git
|
||||
from pre_commit.logging_handler import LoggingHandler
|
||||
from pre_commit.output import get_hook_message
|
||||
from pre_commit.output import sys_stdout_write_wrapper
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import copy
|
||||
|
||||
import jsonschema
|
||||
import jsonschema.validators
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import argparse
|
||||
import pkg_resources
|
||||
import sys
|
||||
|
||||
import pkg_resources
|
||||
|
||||
from pre_commit import color
|
||||
from pre_commit.commands.autoupdate import autoupdate
|
||||
from pre_commit.commands.clean import clean
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
|
||||
from cached_property import cached_property
|
||||
|
||||
import pre_commit.constants as C
|
||||
|
||||
@@ -2,6 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import os.path
|
||||
|
||||
from cached_property import cached_property
|
||||
|
||||
import pre_commit.constants as C
|
||||
|
||||
@@ -5,6 +5,7 @@ import logging
|
||||
import os
|
||||
import os.path
|
||||
import tempfile
|
||||
|
||||
from cached_property import cached_property
|
||||
|
||||
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
||||
|
||||
@@ -5,12 +5,13 @@ import functools
|
||||
import hashlib
|
||||
import os
|
||||
import os.path
|
||||
import pkg_resources
|
||||
import shutil
|
||||
import subprocess
|
||||
import tarfile
|
||||
import tempfile
|
||||
|
||||
import pkg_resources
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def cwd(path):
|
||||
|
||||
Reference in New Issue
Block a user