1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-10 07:12:21 +01:00

Clean up YAML Mapping construction (#910)

* Clean up YAML Mapping construction

Fixes https://github.com/esphome/issues/issues/902

* Clean up DataBase

* Update error messages
This commit is contained in:
Otto Winter
2019-12-07 13:43:51 +01:00
committed by GitHub
parent d280380c8d
commit d09dff3ae3
3 changed files with 89 additions and 104 deletions

View File

@@ -266,11 +266,11 @@ def file_compare(path1, path2):
# A dict of types that need to be converted to heaptypes before a class can be added
# to the object
_TYPE_OVERLOADS = {
int: type('int', (int,), dict()),
float: type('float', (float,), dict()),
str: type('str', (str,), dict()),
dict: type('dict', (str,), dict()),
list: type('list', (list,), dict()),
int: type('EInt', (int,), dict()),
float: type('EFloat', (float,), dict()),
str: type('EStr', (str,), dict()),
dict: type('EDict', (str,), dict()),
list: type('EList', (list,), dict()),
}
if IS_PY2: