mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Remove usage of OrderedDict
This commit is contained in:
parent
5e52a657df
commit
f33716cc17
1 changed files with 1 additions and 3 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
import argparse
|
import argparse
|
||||||
import collections
|
|
||||||
import logging
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
@ -62,8 +61,7 @@ def try_repo(args: argparse.Namespace) -> int:
|
||||||
manifest = sorted(manifest, key=lambda hook: hook['id'])
|
manifest = sorted(manifest, key=lambda hook: hook['id'])
|
||||||
hooks = [{'id': hook['id']} for hook in manifest]
|
hooks = [{'id': hook['id']} for hook in manifest]
|
||||||
|
|
||||||
items = (('repo', repo), ('rev', ref), ('hooks', hooks))
|
config = {'repos': [{'repo': repo, 'rev': ref, 'hooks': hooks}]}
|
||||||
config = {'repos': [collections.OrderedDict(items)]}
|
|
||||||
config_s = ordered_dump(config, **C.YAML_DUMP_KWARGS)
|
config_s = ordered_dump(config, **C.YAML_DUMP_KWARGS)
|
||||||
|
|
||||||
config_filename = os.path.join(tempdir, C.CONFIG_FILE)
|
config_filename = os.path.join(tempdir, C.CONFIG_FILE)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue