From ae21095f39a9c47a155e0af648358d2ba5990c43 Mon Sep 17 00:00:00 2001 From: Hugo Bloem Date: Fri, 10 Nov 2023 11:38:47 +0000 Subject: [PATCH 1/2] python version==3.9 --- .ruff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruff.toml b/.ruff.toml index 7a8331a..cccd6ed 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -1,6 +1,6 @@ # The contents of this file is based on https://github.com/home-assistant/core/blob/dev/pyproject.toml -target-version = "py310" +target-version = "py39" select = [ "B007", # Loop control variable {name} not used within loop body From c83146dab84bb504c08965f44f74aa43b2674d2b Mon Sep 17 00:00:00 2001 From: Hugo Bloem Date: Fri, 10 Nov 2023 11:39:07 +0000 Subject: [PATCH 2/2] fix unsupported operand --- wyoming-microsoft-tts/download.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wyoming-microsoft-tts/download.py b/wyoming-microsoft-tts/download.py index 236e65c..f9c4971 100755 --- a/wyoming-microsoft-tts/download.py +++ b/wyoming-microsoft-tts/download.py @@ -2,7 +2,7 @@ import json import logging from pathlib import Path -from typing import Any +from typing import Any, Union from urllib.parse import quote, urlsplit, urlunsplit from urllib.request import Request, urlopen @@ -57,7 +57,7 @@ def transform_voices_files(response): def get_voices( - download_dir: str | Path, + download_dir: Union[str, Path], update_voices: bool = False, region: str = "westus", key: str = "", @@ -94,7 +94,7 @@ def get_voices( return json.load(voices_file) -def find_voice(name: str, download_dir: str | Path) -> dict[str, Any]: +def find_voice(name: str, download_dir: Union[str, Path]) -> dict[str, Any]: """Look for the files for a voice. Returns: Dict of voice info