1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-27 23:52:28 +01:00

Revert "Sort keys in dicts in output yaml for 'config' command (#1049)" (#1191)

This commit is contained in:
Otto Winter
2020-07-25 14:21:56 +02:00
committed by GitHub
parent 32efa5d83e
commit 55388724af
5 changed files with 9 additions and 18 deletions

View File

@@ -338,7 +338,7 @@ class ESPHomeDumper(yaml.SafeDumper): # pylint: disable=too-many-ancestors
self.represented_objects[self.alias_key] = node
best_style = True
if hasattr(mapping, 'items'):
mapping = sorted(mapping.items(), key=lambda item: item[0])
mapping = list(mapping.items())
for item_key, item_value in mapping:
node_key = self.represent_data(item_key)
node_value = self.represent_data(item_value)