Upgrade voluptuous to 0.10.5 (#7107)
* Upgrade voluptuous to 0.10.5 * Fix tests
This commit is contained in:
parent
7ff1ded0b5
commit
1f4f2d7086
5 changed files with 7 additions and 8 deletions
|
@ -454,10 +454,9 @@ def _identify_config_schema(module):
|
||||||
except (AttributeError, KeyError):
|
except (AttributeError, KeyError):
|
||||||
return (None, None)
|
return (None, None)
|
||||||
t_schema = str(schema)
|
t_schema = str(schema)
|
||||||
if (t_schema.startswith('<function ordered_dict') or
|
if t_schema.startswith(('{', '<function ordered_dict')):
|
||||||
t_schema.startswith('<Schema({<function slug')):
|
|
||||||
return ('dict', schema)
|
return ('dict', schema)
|
||||||
if t_schema.startswith('All(<function ensure_list'):
|
if t_schema.startswith(('[', 'All(<function ensure_list')):
|
||||||
return ('list', schema)
|
return ('list', schema)
|
||||||
return '', schema
|
return '', schema
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ pyyaml>=3.11,<4
|
||||||
pytz>=2017.02
|
pytz>=2017.02
|
||||||
pip>=7.1.0
|
pip>=7.1.0
|
||||||
jinja2>=2.9.5
|
jinja2>=2.9.5
|
||||||
voluptuous==0.9.3
|
voluptuous==0.10.5
|
||||||
typing>=3,<4
|
typing>=3,<4
|
||||||
aiohttp==2.0.7
|
aiohttp==2.0.7
|
||||||
async_timeout==1.2.0
|
async_timeout==1.2.0
|
||||||
|
|
|
@ -4,7 +4,7 @@ pyyaml>=3.11,<4
|
||||||
pytz>=2017.02
|
pytz>=2017.02
|
||||||
pip>=7.1.0
|
pip>=7.1.0
|
||||||
jinja2>=2.9.5
|
jinja2>=2.9.5
|
||||||
voluptuous==0.9.3
|
voluptuous==0.10.5
|
||||||
typing>=3,<4
|
typing>=3,<4
|
||||||
aiohttp==2.0.7
|
aiohttp==2.0.7
|
||||||
async_timeout==1.2.0
|
async_timeout==1.2.0
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -20,7 +20,7 @@ REQUIRES = [
|
||||||
'pytz>=2017.02',
|
'pytz>=2017.02',
|
||||||
'pip>=7.1.0',
|
'pip>=7.1.0',
|
||||||
'jinja2>=2.9.5',
|
'jinja2>=2.9.5',
|
||||||
'voluptuous==0.9.3',
|
'voluptuous==0.10.5',
|
||||||
'typing>=3,<4',
|
'typing>=3,<4',
|
||||||
'aiohttp==2.0.7',
|
'aiohttp==2.0.7',
|
||||||
'async_timeout==1.2.0',
|
'async_timeout==1.2.0',
|
||||||
|
|
|
@ -509,7 +509,7 @@ def test_merge_once_only(merge_log_err):
|
||||||
'mqtt': {}, 'api': {}
|
'mqtt': {}, 'api': {}
|
||||||
}
|
}
|
||||||
config_util.merge_packages_config(config, packages)
|
config_util.merge_packages_config(config, packages)
|
||||||
assert merge_log_err.call_count == 2
|
assert merge_log_err.call_count == 1
|
||||||
assert len(config) == 3
|
assert len(config) == 3
|
||||||
|
|
||||||
|
|
||||||
|
@ -521,7 +521,7 @@ def test_merge_id_schema(hass):
|
||||||
'script': 'dict',
|
'script': 'dict',
|
||||||
'input_boolean': 'dict',
|
'input_boolean': 'dict',
|
||||||
'shell_command': 'dict',
|
'shell_command': 'dict',
|
||||||
'qwikswitch': '',
|
'qwikswitch': 'dict',
|
||||||
}
|
}
|
||||||
for name, expected_type in types.items():
|
for name, expected_type in types.items():
|
||||||
module = config_util.get_component(name)
|
module = config_util.get_component(name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue