Skip to content

Commit 90bdc0c

Browse files
author
Yair Fried
committed
Merge pull request #81 from aopincar/79_preserve_args_order_in_help
Preserves params order in help screen as in spec
2 parents dbed896 + 72e33b0 commit 90bdc0c

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

cli/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import ConfigParser
2-
3-
import clg
42
import os
53
import yaml
64

5+
import clg
6+
import yamlordereddictloader
7+
78
from cli import exceptions
89
from cli import utils
910

@@ -62,7 +63,8 @@ def _get_specs(cls, module_name, config):
6263
"""
6364
res = {}
6465
for spec_file in cls._get_all_specs(config, subfolder=module_name):
65-
spec = yaml.load(open(spec_file))
66+
spec = yaml.load(open(spec_file),
67+
Loader=yamlordereddictloader.Loader)
6668
utils.dict_merge(res, spec)
6769
return res
6870

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ PyYAML>=3.11
55
configure>=0.5
66
colorlog>=2.6.1
77
clg>=2.0.0
8+
yamlordereddictloader>=0.1.1

0 commit comments

Comments
 (0)