diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index be0cb1775..02d1af0a8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,7 +6,7 @@ "appPort": "9123:8123", "runArgs": [ "-e", - "GIT_EDITOR=\"code --wait\"", + "GIT_EDITOR=code --wait", "--privileged" ], "extensions": [ @@ -28,4 +28,4 @@ "editor.formatOnType": true, "files.trimTrailingWhitespace": true } -} +} \ No newline at end of file diff --git a/hassio/discovery/__init__.py b/hassio/discovery/__init__.py index 7fc5bfb49..3af8961ec 100644 --- a/hassio/discovery/__init__.py +++ b/hassio/discovery/__init__.py @@ -31,8 +31,8 @@ class Message: addon: str = attr.ib() service: str = attr.ib() - config: Dict[str, Any] = attr.ib(cmp=False) - uuid: UUID = attr.ib(factory=lambda: uuid4().hex, cmp=False) + config: Dict[str, Any] = attr.ib(eq=False) + uuid: UUID = attr.ib(factory=lambda: uuid4().hex, eq=False) class Discovery(CoreSysAttributes, JsonConfig): diff --git a/hassio/host/alsa.py b/hassio/host/alsa.py index 180fde33c..e17082364 100644 --- a/hassio/host/alsa.py +++ b/hassio/host/alsa.py @@ -11,8 +11,13 @@ from ..coresys import CoreSysAttributes _LOGGER: logging.Logger = logging.getLogger(__name__) -# pylint: disable=invalid-name -DefaultConfig = attr.make_class("DefaultConfig", ["input", "output"]) + +@attr.s() +class DefaultConfig: + """Default config input/output ALSA channel.""" + + input: str = attr.ib() + output: str = attr.ib() AUDIODB_JSON: Path = Path(__file__).parents[1].joinpath("data/audiodb.json") diff --git a/hassio/host/services.py b/hassio/host/services.py index 5eb7c70ba..6dd6367f4 100644 --- a/hassio/host/services.py +++ b/hassio/host/services.py @@ -91,9 +91,9 @@ class ServiceManager(CoreSysAttributes): class ServiceInfo: """Represent a single Service.""" - name = attr.ib(type=str) - description = attr.ib(type=str) - state = attr.ib(type=str) + name: str = attr.ib() + description: str = attr.ib() + state: str = attr.ib() @staticmethod def read_from(unit): diff --git a/requirements.txt b/requirements.txt index 5bb5d17fa..0a0185fda 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ aiohttp==3.6.2 async_timeout==3.0.1 -attrs==19.1.0 +attrs==19.3.0 cchardet==2.1.4 colorlog==4.0.2 cpe==1.2.1