From b09dd2ea287c855e945571d208e2419d3112bb07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romuald=20Texier-Marcad=C3=A9?= Date: Thu, 14 Mar 2024 18:18:32 +0100 Subject: [PATCH] black formatting. --- examples/conversation/observer.py | 1 + examples/conversation/stream_file.py | 1 + examples/recognition/async_bot_lib.py | 1 + examples/recognition/sync_bot_lib.py | 1 + examples/recognition/test_runner.py | 6 +++--- src/uhlive/stream/conversation/__init__.py | 1 - src/uhlive/stream/conversation/client.py | 1 - src/uhlive/stream/recognition/events.py | 1 - 8 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/conversation/observer.py b/examples/conversation/observer.py index 268070d..a69471e 100644 --- a/examples/conversation/observer.py +++ b/examples/conversation/observer.py @@ -1,6 +1,7 @@ """ Get the events of an ongoing conversation. """ + import argparse import os from time import time diff --git a/examples/conversation/stream_file.py b/examples/conversation/stream_file.py index 3afbbb0..b1ef3a6 100644 --- a/examples/conversation/stream_file.py +++ b/examples/conversation/stream_file.py @@ -1,6 +1,7 @@ """ Stream file in real time in order to simulate live speech. """ + import argparse import os import time diff --git a/examples/recognition/async_bot_lib.py b/examples/recognition/async_bot_lib.py index 7d4c88e..4257940 100644 --- a/examples/recognition/async_bot_lib.py +++ b/examples/recognition/async_bot_lib.py @@ -3,6 +3,7 @@ This code is provided as-is for demonstration purposes only and is not suitable for production. Use at your own risk. """ + import asyncio import base64 from typing import Dict diff --git a/examples/recognition/sync_bot_lib.py b/examples/recognition/sync_bot_lib.py index bd784ec..a9b8a7f 100644 --- a/examples/recognition/sync_bot_lib.py +++ b/examples/recognition/sync_bot_lib.py @@ -3,6 +3,7 @@ This code is provided as-is for demonstration purposes only and is not suitable for production. Use at your own risk. """ + import base64 from typing import Dict diff --git a/examples/recognition/test_runner.py b/examples/recognition/test_runner.py index 5edbd63..d98a981 100644 --- a/examples/recognition/test_runner.py +++ b/examples/recognition/test_runner.py @@ -157,9 +157,9 @@ def walk_tests(self, in_files: Sequence[str], overrides: Dict[str, Any]): nlu_desc = test["expected"].get("interpretation") if nlu_desc: if "confidence" not in nlu_desc: - nlu_desc[ - "confidence" - ] = 0.5 # ignored anyway, but expected by Interpretation + nlu_desc["confidence"] = ( + 0.5 # ignored anyway, but expected by Interpretation + ) interpretation: Optional[Interpretation] = Interpretation(nlu_desc) else: interpretation = None diff --git a/src/uhlive/stream/conversation/__init__.py b/src/uhlive/stream/conversation/__init__.py index 75b050e..28c9098 100644 --- a/src/uhlive/stream/conversation/__init__.py +++ b/src/uhlive/stream/conversation/__init__.py @@ -80,7 +80,6 @@ async def main(uhlive_client, uhlive_secret): See the [complete examples in the source distribution](https://github.com/uhlive/python-sdk/tree/main/examples/conversation). """ - import os from urllib.parse import urljoin diff --git a/src/uhlive/stream/conversation/client.py b/src/uhlive/stream/conversation/client.py index 4c9effa..fcb0d93 100644 --- a/src/uhlive/stream/conversation/client.py +++ b/src/uhlive/stream/conversation/client.py @@ -2,7 +2,6 @@ Object oriented abstraction over the Conversation API protocol and workflow. """ - import json from array import array from enum import Enum diff --git a/src/uhlive/stream/recognition/events.py b/src/uhlive/stream/recognition/events.py index 2aeb3c5..25c652f 100644 --- a/src/uhlive/stream/recognition/events.py +++ b/src/uhlive/stream/recognition/events.py @@ -4,7 +4,6 @@ See also https://docs.allo-media.net/stream-h2b/protocols/websocket/#websocket-for-voicebots. """ - import json from datetime import datetime from enum import Enum