File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from __future__ import absolute_import
2+
3+ # This module serves only as a shim for OrderedDict
4+
5+ try :
6+ from collections import OrderedDict
7+ except ImportError :
8+ from orderddict import OrderedDict
9+
10+ __all__ = (OrderedDict .__name__ ,)
Original file line number Diff line number Diff line change 66from pre_commit .clientlib .validate_manifest import validate_manifest
77from pre_commit .hooks_workspace import in_hooks_workspace
88from pre_commit .languages .all import languages
9+ from pre_commit .ordereddict import OrderedDict
910from pre_commit .util import cached_property
1011
1112
@@ -29,7 +30,7 @@ def languages(self):
2930
3031 @cached_property
3132 def hooks (self ):
32- return dict (
33+ return OrderedDict (
3334 (hook ['id' ], dict (hook , ** self .manifest [hook ['id' ]]))
3435 for hook in self .repo_config ['hooks' ]
3536 )
Original file line number Diff line number Diff line change 1+ import sys
12from setuptools import find_packages
23from setuptools import setup
34
5+
6+ install_requires = [
7+ 'argparse' ,
8+ 'jsonschema' ,
9+ 'plumbum' ,
10+ 'pyyaml' ,
11+ 'simplejson' ,
12+ ]
13+
14+
15+ if sys .version_info < (2 , 7 ):
16+ install_requires .append ('ordereddict' )
17+
18+
419setup (
520 name = 'pre_commit' ,
621 version = '0.0.0' ,
1025 'resources/pre-commit.sh'
1126 ]
1227 },
13- install_requires = [
14- 'argparse' ,
15- 'jsonschema' ,
16- 'plumbum' ,
17- 'pyyaml' ,
18- 'simplejson' ,
19- ],
28+ install_requires = install_requires ,
2029 entry_points = {
2130 'console_scripts' : [
2231 'pre-commit = pre_commit.run:run' ,
You can’t perform that action at this time.
0 commit comments