mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 12:30:08 -06:00
2
Makefile
2
Makefile
@@ -14,7 +14,7 @@ test: .venv.touch
|
||||
tox $(REBUILD_FLAG)
|
||||
|
||||
|
||||
.venv.touch: setup.py requirements.txt requirements-dev.txt
|
||||
.venv.touch: setup.py requirements-dev.txt
|
||||
$(eval REBUILD_FLAG := --recreate)
|
||||
touch .venv.touch
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import sys
|
||||
|
||||
from asottile.ordereddict import OrderedDict
|
||||
from asottile.yaml import ordered_dump
|
||||
from asottile.yaml import ordered_load
|
||||
from plumbum import local
|
||||
@@ -12,6 +11,7 @@ import pre_commit.constants as C
|
||||
from pre_commit.clientlib.validate_config import CONFIG_JSON_SCHEMA
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -2,11 +2,10 @@ from __future__ import unicode_literals
|
||||
|
||||
"""five: six, redux"""
|
||||
# pylint:disable=invalid-name
|
||||
PY2 = (str is bytes)
|
||||
PY3 = (str is not bytes)
|
||||
PY2 = str is bytes
|
||||
PY3 = str is not bytes
|
||||
|
||||
# provide a symettrical `text` type to `bytes`
|
||||
if PY2:
|
||||
if PY2: # pragma: no cover (PY2 only)
|
||||
text = unicode # flake8: noqa
|
||||
else:
|
||||
else: # pragma: no cover (PY3 only)
|
||||
text = str
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from asottile.cached_property import cached_property
|
||||
from cached_property import cached_property
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.clientlib.validate_manifest import load_manifest
|
||||
|
||||
7
pre_commit/ordereddict.py
Normal file
7
pre_commit/ordereddict.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
try:
|
||||
from collections import OrderedDict # noqa
|
||||
except ImportError: # pragma: no cover (PY26)
|
||||
from ordereddict import OrderedDict # noqa
|
||||
@@ -1,10 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from asottile.cached_property import cached_property
|
||||
from asottile.ordereddict import OrderedDict
|
||||
from cached_property import cached_property
|
||||
|
||||
from pre_commit.languages.all import languages
|
||||
from pre_commit.manifest import Manifest
|
||||
from pre_commit.ordereddict import OrderedDict
|
||||
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import os.path
|
||||
from asottile.cached_property import cached_property
|
||||
from cached_property import cached_property
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit import git
|
||||
|
||||
@@ -5,7 +5,7 @@ import logging
|
||||
import os
|
||||
import os.path
|
||||
import tempfile
|
||||
from asottile.cached_property import cached_property
|
||||
from cached_property import cached_property
|
||||
from plumbum import local
|
||||
|
||||
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.
|
||||
4
setup.py
4
setup.py
@@ -32,11 +32,11 @@ setup(
|
||||
},
|
||||
install_requires=[
|
||||
'argparse',
|
||||
'asottile.cached_property',
|
||||
'asottile.ordereddict',
|
||||
'asottile.yaml',
|
||||
'cached-property',
|
||||
'jsonschema',
|
||||
'nodeenv>=0.9.4',
|
||||
'ordereddict',
|
||||
'plumbum',
|
||||
'pyyaml',
|
||||
'simplejson',
|
||||
|
||||
@@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import io
|
||||
import os.path
|
||||
from asottile.ordereddict import OrderedDict
|
||||
from asottile.yaml import ordered_dump
|
||||
from plumbum import local
|
||||
|
||||
@@ -12,6 +11,7 @@ from pre_commit.clientlib.validate_manifest import load_manifest
|
||||
from pre_commit.clientlib.validate_config import CONFIG_JSON_SCHEMA
|
||||
from pre_commit.clientlib.validate_config import validate_config_extra
|
||||
from pre_commit.jsonschema_extensions import apply_defaults
|
||||
from pre_commit.ordereddict import OrderedDict
|
||||
from testing.util import copy_tree_to_path
|
||||
from testing.util import get_head_sha
|
||||
from testing.util import get_resource_path
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
from asottile.ordereddict import OrderedDict
|
||||
from asottile.yaml import ordered_load
|
||||
|
||||
from pre_commit.clientlib.validate_base import get_validator
|
||||
from pre_commit.ordereddict import OrderedDict
|
||||
from testing.util import get_resource_path
|
||||
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
import shutil
|
||||
from asottile.ordereddict import OrderedDict
|
||||
from plumbum import local
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.commands.autoupdate import _update_repository
|
||||
from pre_commit.commands.autoupdate import autoupdate
|
||||
from pre_commit.commands.autoupdate import RepositoryCannotBeUpdatedError
|
||||
from pre_commit.ordereddict import OrderedDict
|
||||
from pre_commit.runner import Runner
|
||||
from testing.auto_namedtuple import auto_namedtuple
|
||||
from testing.fixtures import make_config_from_repo
|
||||
|
||||
Reference in New Issue
Block a user