mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 17:14:43 +04:00
commit
fe5e829ea4
13 changed files with 23 additions and 18 deletions
2
Makefile
2
Makefile
|
|
@ -14,7 +14,7 @@ test: .venv.touch
|
||||||
tox $(REBUILD_FLAG)
|
tox $(REBUILD_FLAG)
|
||||||
|
|
||||||
|
|
||||||
.venv.touch: setup.py requirements.txt requirements-dev.txt
|
.venv.touch: setup.py requirements-dev.txt
|
||||||
$(eval REBUILD_FLAG := --recreate)
|
$(eval REBUILD_FLAG := --recreate)
|
||||||
touch .venv.touch
|
touch .venv.touch
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from asottile.ordereddict import OrderedDict
|
|
||||||
from asottile.yaml import ordered_dump
|
from asottile.yaml import ordered_dump
|
||||||
from asottile.yaml import ordered_load
|
from asottile.yaml import ordered_load
|
||||||
from plumbum import local
|
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 CONFIG_JSON_SCHEMA
|
||||||
from pre_commit.clientlib.validate_config import load_config
|
from pre_commit.clientlib.validate_config import load_config
|
||||||
from pre_commit.jsonschema_extensions import remove_defaults
|
from pre_commit.jsonschema_extensions import remove_defaults
|
||||||
|
from pre_commit.ordereddict import OrderedDict
|
||||||
from pre_commit.repository import Repository
|
from pre_commit.repository import Repository
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,10 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
"""five: six, redux"""
|
"""five: six, redux"""
|
||||||
# pylint:disable=invalid-name
|
# pylint:disable=invalid-name
|
||||||
PY2 = (str is bytes)
|
PY2 = str is bytes
|
||||||
PY3 = (str is not bytes)
|
PY3 = str is not bytes
|
||||||
|
|
||||||
# provide a symettrical `text` type to `bytes`
|
if PY2: # pragma: no cover (PY2 only)
|
||||||
if PY2:
|
|
||||||
text = unicode # flake8: noqa
|
text = unicode # flake8: noqa
|
||||||
else:
|
else: # pragma: no cover (PY3 only)
|
||||||
text = str
|
text = str
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
from asottile.cached_property import cached_property
|
from cached_property import cached_property
|
||||||
|
|
||||||
import pre_commit.constants as C
|
import pre_commit.constants as C
|
||||||
from pre_commit.clientlib.validate_manifest import load_manifest
|
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 __future__ import unicode_literals
|
||||||
|
|
||||||
from asottile.cached_property import cached_property
|
from cached_property import cached_property
|
||||||
from asottile.ordereddict import OrderedDict
|
|
||||||
|
|
||||||
from pre_commit.languages.all import languages
|
from pre_commit.languages.all import languages
|
||||||
from pre_commit.manifest import Manifest
|
from pre_commit.manifest import Manifest
|
||||||
|
from pre_commit.ordereddict import OrderedDict
|
||||||
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
from asottile.cached_property import cached_property
|
from cached_property import cached_property
|
||||||
|
|
||||||
import pre_commit.constants as C
|
import pre_commit.constants as C
|
||||||
from pre_commit import git
|
from pre_commit import git
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import logging
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import tempfile
|
import tempfile
|
||||||
from asottile.cached_property import cached_property
|
from cached_property import cached_property
|
||||||
from plumbum import local
|
from plumbum import local
|
||||||
|
|
||||||
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
.
|
|
||||||
4
setup.py
4
setup.py
|
|
@ -32,11 +32,11 @@ setup(
|
||||||
},
|
},
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'argparse',
|
'argparse',
|
||||||
'asottile.cached_property',
|
|
||||||
'asottile.ordereddict',
|
|
||||||
'asottile.yaml',
|
'asottile.yaml',
|
||||||
|
'cached-property',
|
||||||
'jsonschema',
|
'jsonschema',
|
||||||
'nodeenv>=0.9.4',
|
'nodeenv>=0.9.4',
|
||||||
|
'ordereddict',
|
||||||
'plumbum',
|
'plumbum',
|
||||||
'pyyaml',
|
'pyyaml',
|
||||||
'simplejson',
|
'simplejson',
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import io
|
import io
|
||||||
import os.path
|
import os.path
|
||||||
from asottile.ordereddict import OrderedDict
|
|
||||||
from asottile.yaml import ordered_dump
|
from asottile.yaml import ordered_dump
|
||||||
from plumbum import local
|
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 CONFIG_JSON_SCHEMA
|
||||||
from pre_commit.clientlib.validate_config import validate_config_extra
|
from pre_commit.clientlib.validate_config import validate_config_extra
|
||||||
from pre_commit.jsonschema_extensions import apply_defaults
|
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 copy_tree_to_path
|
||||||
from testing.util import get_head_sha
|
from testing.util import get_head_sha
|
||||||
from testing.util import get_resource_path
|
from testing.util import get_resource_path
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from asottile.ordereddict import OrderedDict
|
|
||||||
from asottile.yaml import ordered_load
|
from asottile.yaml import ordered_load
|
||||||
|
|
||||||
from pre_commit.clientlib.validate_base import get_validator
|
from pre_commit.clientlib.validate_base import get_validator
|
||||||
|
from pre_commit.ordereddict import OrderedDict
|
||||||
from testing.util import get_resource_path
|
from testing.util import get_resource_path
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import shutil
|
import shutil
|
||||||
from asottile.ordereddict import OrderedDict
|
|
||||||
from plumbum import local
|
from plumbum import local
|
||||||
|
|
||||||
import pre_commit.constants as C
|
import pre_commit.constants as C
|
||||||
from pre_commit.commands.autoupdate import _update_repository
|
from pre_commit.commands.autoupdate import _update_repository
|
||||||
from pre_commit.commands.autoupdate import autoupdate
|
from pre_commit.commands.autoupdate import autoupdate
|
||||||
from pre_commit.commands.autoupdate import RepositoryCannotBeUpdatedError
|
from pre_commit.commands.autoupdate import RepositoryCannotBeUpdatedError
|
||||||
|
from pre_commit.ordereddict import OrderedDict
|
||||||
from pre_commit.runner import Runner
|
from pre_commit.runner import Runner
|
||||||
from testing.auto_namedtuple import auto_namedtuple
|
from testing.auto_namedtuple import auto_namedtuple
|
||||||
from testing.fixtures import make_config_from_repo
|
from testing.fixtures import make_config_from_repo
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue