mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-28 11:36:32 +00:00
commit
cea1a1a15f
@ -2,6 +2,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import secrets
|
import secrets
|
||||||
|
from typing import Any, Dict
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -85,6 +86,7 @@ from ..const import (
|
|||||||
STATE_STARTED,
|
STATE_STARTED,
|
||||||
STATE_STOPPED,
|
STATE_STOPPED,
|
||||||
)
|
)
|
||||||
|
from ..coresys import CoreSys
|
||||||
from ..discovery.validate import valid_discovery_service
|
from ..discovery.validate import valid_discovery_service
|
||||||
from ..validate import (
|
from ..validate import (
|
||||||
ALSA_DEVICE,
|
ALSA_DEVICE,
|
||||||
@ -310,7 +312,7 @@ SCHEMA_ADDON_SNAPSHOT = vol.Schema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def validate_options(coresys, raw_schema):
|
def validate_options(coresys: CoreSys, raw_schema: Dict[str, Any]):
|
||||||
"""Validate schema."""
|
"""Validate schema."""
|
||||||
|
|
||||||
def validate(struct):
|
def validate(struct):
|
||||||
@ -346,7 +348,7 @@ def validate_options(coresys, raw_schema):
|
|||||||
|
|
||||||
# pylint: disable=no-value-for-parameter
|
# pylint: disable=no-value-for-parameter
|
||||||
# pylint: disable=inconsistent-return-statements
|
# pylint: disable=inconsistent-return-statements
|
||||||
def _single_validate(coresys, typ, value, key):
|
def _single_validate(coresys: CoreSys, typ: str, value: Any, key: str):
|
||||||
"""Validate a single element."""
|
"""Validate a single element."""
|
||||||
# if required argument
|
# if required argument
|
||||||
if value is None:
|
if value is None:
|
||||||
@ -385,7 +387,7 @@ def _single_validate(coresys, typ, value, key):
|
|||||||
return NETWORK_PORT(value)
|
return NETWORK_PORT(value)
|
||||||
elif typ.startswith(V_MATCH):
|
elif typ.startswith(V_MATCH):
|
||||||
return vol.Match(match.group("match"))(str(value))
|
return vol.Match(match.group("match"))(str(value))
|
||||||
elif typ.strartswith(V_LIST):
|
elif typ.startswith(V_LIST):
|
||||||
return vol.In(match.group("list").split("|"))(str(value))
|
return vol.In(match.group("list").split("|"))(str(value))
|
||||||
|
|
||||||
raise vol.Invalid(f"Fatal error for {key} type {typ}")
|
raise vol.Invalid(f"Fatal error for {key} type {typ}")
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from ipaddress import ip_network
|
from ipaddress import ip_network
|
||||||
|
|
||||||
HASSIO_VERSION = "188"
|
HASSIO_VERSION = "189"
|
||||||
|
|
||||||
|
|
||||||
URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons"
|
URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
aiohttp==3.5.4
|
aiohttp==3.6.1
|
||||||
async_timeout==3.0.1
|
async_timeout==3.0.1
|
||||||
attrs==19.1.0
|
attrs==19.1.0
|
||||||
cchardet==2.1.4
|
cchardet==2.1.4
|
||||||
@ -7,10 +7,10 @@ cpe==1.2.1
|
|||||||
cryptography==2.7
|
cryptography==2.7
|
||||||
docker==4.0.2
|
docker==4.0.2
|
||||||
gitpython==3.0.2
|
gitpython==3.0.2
|
||||||
packaging==19.1
|
packaging==19.2
|
||||||
pytz==2019.2
|
pytz==2019.2
|
||||||
pyudev==0.21.0
|
pyudev==0.21.0
|
||||||
ruamel.yaml==0.15.100
|
ruamel.yaml==0.15.100
|
||||||
uvloop==0.12.2
|
uvloop==0.13.0
|
||||||
voluptuous==0.11.7
|
voluptuous==0.11.7
|
||||||
ptvsd==4.3.2
|
ptvsd==4.3.2
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
flake8==3.7.8
|
flake8==3.7.8
|
||||||
pylint==2.3.1
|
pylint==2.3.1
|
||||||
pytest==5.1.2
|
pytest==5.1.3
|
||||||
pytest-timeout==1.3.3
|
pytest-timeout==1.3.3
|
||||||
pytest-aiohttp==0.3.0
|
pytest-aiohttp==0.3.0
|
||||||
|
2
setup.py
2
setup.py
@ -19,7 +19,7 @@ setup(
|
|||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
"License :: OSI Approved :: Apache Software License",
|
"License :: OSI Approved :: Apache Software License",
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
"Topic :: Home Automation"
|
"Topic :: Home Automation",
|
||||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||||
"Topic :: Scientific/Engineering :: Atmospheric Science",
|
"Topic :: Scientific/Engineering :: Atmospheric Science",
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user