mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Make ordereddict a direct dependency.
This commit is contained in:
parent
203c554734
commit
a984a02c84
8 changed files with 17 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
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.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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue