mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Merge 20addf4d87 into c751f629a6
This commit is contained in:
commit
9f8f6390a3
1 changed files with 7 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
|||
import argparse
|
||||
import collections
|
||||
import functools
|
||||
import os
|
||||
|
||||
from aspy.yaml import ordered_load
|
||||
from identify.identify import ALL_TAGS
|
||||
|
|
@ -153,9 +154,12 @@ def ordered_load_normalize_legacy_config(contents):
|
|||
data = ordered_load(contents)
|
||||
if isinstance(data, list):
|
||||
# TODO: Once happy, issue a deprecation warning and instructions
|
||||
return collections.OrderedDict([('repos', data)])
|
||||
else:
|
||||
return data
|
||||
data = collections.OrderedDict([('repos', data)])
|
||||
|
||||
for repo_config in data['repos']:
|
||||
repo_config['repo'] = os.path.expanduser(repo_config['repo'])
|
||||
|
||||
return data
|
||||
|
||||
|
||||
load_config = functools.partial(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue