diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py index 018300ada..c7c834560 100644 --- a/conda_smithy/configure_feedstock.py +++ b/conda_smithy/configure_feedstock.py @@ -714,14 +714,9 @@ def finalize_config(config, platform, arch, forge_config): # pairs. Only for the latter it never sorts and retains the order of the OrderedDict. def represent_ordered_dict(yaml_representer, data): yaml = YAML() - yaml.default_flow_style = False - print('#### data items', data.items()) - print('#### yaml_representer', yaml_representer) - # return yaml_representer.represent_dict(OrderedDict, data.items()) - return yaml.representer.represent_dict - # return SafeRepresenter.represent_dict( - # yaml_representer, data.items() - # ) + return yaml.representer.SafeRepresenter.represent_dict( + yaml_representer, data.items() + ) @@ -753,7 +748,7 @@ def dump_subspace_config_files( # get rid of the special object notation in the yaml file for objects that we dump yaml.representer.add_representer(set, SafeRepresenter.represent_list) yaml.representer.add_representer(tuple, SafeRepresenter.represent_list) - yaml.representer.add_representer(OrderedDict, SafeRepresenter.represent_dict) + yaml.representer.add_representer(OrderedDict, SafeRepresenter.represent_ordered_dict) platform_arch = "{}-{}".format(platform, arch) @@ -799,8 +794,8 @@ def dump_subspace_config_files( ].replace("_", "-"), } ) - # pprint.pp(result) - # pprint.pp(sorted(result, key=lambda x: x["config_name"])) + pprint.pp(result) + pprint.pp(sorted(result, key=lambda x: x["config_name"])) return sorted(result, key=lambda x: x["config_name"])