mirror of
https://github.com/esphome/esphome.git
synced 2024-11-15 03:28:12 +01:00
Merge branch 'c_loader' into integration
This commit is contained in:
commit
e247d08a3b
1 changed files with 1 additions and 5 deletions
|
@ -25,14 +25,10 @@ from esphome.util import OrderedDict, filter_yaml_files
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from yaml import CSafeLoader as FastestAvailableSafeLoader
|
from yaml import CSafeLoader as FastestAvailableSafeLoader
|
||||||
from yaml import CSafeDumper as FastestAvailableSafeDumper
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from yaml import ( # type: ignore[assignment]
|
from yaml import ( # type: ignore[assignment]
|
||||||
SafeLoader as FastestAvailableSafeLoader,
|
SafeLoader as FastestAvailableSafeLoader,
|
||||||
)
|
)
|
||||||
from yaml import ( # type: ignore[assignment]
|
|
||||||
SafeDumper as FastestAvailableSafeDumper,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
@ -451,7 +447,7 @@ def is_secret(value):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
class ESPHomeDumper(FastestAvailableSafeDumper):
|
class ESPHomeDumper(yaml.SafeDumper):
|
||||||
def represent_mapping(self, tag, mapping, flow_style=None):
|
def represent_mapping(self, tag, mapping, flow_style=None):
|
||||||
value = []
|
value = []
|
||||||
node = yaml.MappingNode(tag, value, flow_style=flow_style)
|
node = yaml.MappingNode(tag, value, flow_style=flow_style)
|
||||||
|
|
Loading…
Reference in a new issue