Merge pull request #121 from pre-commit/packages_redux

Packages redux
This commit is contained in:
Anthony Sottile
2014-06-17 08:00:10 -07:00
13 changed files with 23 additions and 18 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1 +0,0 @@
.

View File

@@ -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',

View File

@@ -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

View File

@@ -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

View File

@@ -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