From b2b8091be798a31e83226e8fb5e9bcb1a9abdf26 Mon Sep 17 00:00:00 2001 From: Jesper Nilsson Date: Mon, 18 Mar 2024 07:26:33 +0000 Subject: [PATCH] fix mypy error in ci --- .github/templates/run_in_venv/action.yaml | 1 - viseron/components/edgetpu/config.py | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/templates/run_in_venv/action.yaml b/.github/templates/run_in_venv/action.yaml index de2419fa6..0b832468c 100644 --- a/.github/templates/run_in_venv/action.yaml +++ b/.github/templates/run_in_venv/action.yaml @@ -14,7 +14,6 @@ runs: run: | PYTHON_PATH=$(which python3) source venv/bin/activate - export PYTHONWARNINGS=ignore::yaml.YAMLLoadWarning PYTHON_BROKEN_PATH=$(dirname $(which pip)) rm $PYTHON_BROKEN_PATH/python ln -s $PYTHON_PATH $PYTHON_BROKEN_PATH/python diff --git a/viseron/components/edgetpu/config.py b/viseron/components/edgetpu/config.py index 359b74b83..f012665c9 100644 --- a/viseron/components/edgetpu/config.py +++ b/viseron/components/edgetpu/config.py @@ -1,6 +1,8 @@ """EdgeTPU configuration specials.""" +from __future__ import annotations import re +from typing import Any import voluptuous as vol @@ -86,7 +88,7 @@ def __call__(self, value): def get_label_schema(domain): """Return domain specific schema.""" - schema = { + schema: dict[vol.Optional, Any] = { vol.Optional( CONFIG_LABEL_PATH, default=DEFAULT_LABEL_PATH_MAP[domain],