mirror of
https://github.com/esphome/esphome.git
synced 2025-02-07 13:40:59 +00:00
loader only
This commit is contained in:
parent
037f593363
commit
bdf3528cbb
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user