mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Simplify config loading code
This commit is contained in:
parent
a5f3cefb64
commit
c7ba14e8ef
1 changed files with 3 additions and 3 deletions
|
|
@ -153,9 +153,9 @@ def ordered_load_normalize_legacy_config(contents):
|
||||||
data = ordered_load(contents)
|
data = ordered_load(contents)
|
||||||
if isinstance(data, list):
|
if isinstance(data, list):
|
||||||
# TODO: Once happy, issue a deprecation warning and instructions
|
# TODO: Once happy, issue a deprecation warning and instructions
|
||||||
return collections.OrderedDict([('repos', data)])
|
data = collections.OrderedDict([('repos', data)])
|
||||||
else:
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
load_config = functools.partial(
|
load_config = functools.partial(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue