From bdf3528cbb7eede4c8488e3c75ecaeed3cb692c9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 9 Nov 2023 17:03:10 -0600 Subject: [PATCH] loader only --- esphome/yaml_util.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/esphome/yaml_util.py b/esphome/yaml_util.py index 567a3aec15..a954415d12 100644 --- a/esphome/yaml_util.py +++ b/esphome/yaml_util.py @@ -25,14 +25,10 @@ from esphome.util import OrderedDict, filter_yaml_files try: from yaml import CSafeLoader as FastestAvailableSafeLoader - from yaml import CSafeDumper as FastestAvailableSafeDumper except ImportError: from yaml import ( # type: ignore[assignment] SafeLoader as FastestAvailableSafeLoader, ) - from yaml import ( # type: ignore[assignment] - SafeDumper as FastestAvailableSafeDumper, - ) _LOGGER = logging.getLogger(__name__) @@ -451,7 +447,7 @@ def is_secret(value): return None -class ESPHomeDumper(FastestAvailableSafeDumper): +class ESPHomeDumper(yaml.SafeDumper): def represent_mapping(self, tag, mapping, flow_style=None): value = [] node = yaml.MappingNode(tag, value, flow_style=flow_style)