Skip to content

Commit d2fa48c

Browse files
authored
Removes ability to sort the yaml config keys (#123)
Removes ability to sort the yaml config keys in the generated data while the print_data happens or while dumping to output file. As shown in help(yaml.Dumper), sort_keys defaults to True.
1 parent 633b7f0 commit d2fa48c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

himl/config_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def get_values_from_dir_path(self):
263263
return values
264264

265265
def output_yaml_data(self, data):
266-
return yaml.dump(data, Dumper=ConfigGenerator.yaml_dumper(), default_flow_style=False, width=200)
266+
return yaml.dump(data, Dumper=ConfigGenerator.yaml_dumper(), default_flow_style=False, width=200, sort_keys=False)
267267

268268
def yaml_to_json(self, yaml_data):
269269
return json.dumps(yaml.load(yaml_data, Loader=yaml.SafeLoader), indent=4)

0 commit comments

Comments
 (0)