From 593e4c7c9dc0a06168dec1865f90be19e8350fbe Mon Sep 17 00:00:00 2001 From: Eddasol Date: Wed, 11 Dec 2024 09:57:13 +0100 Subject: [PATCH] Give generate_media_config optional return type --- src/robot_interface/models/mission/task.py | 2 +- src/robot_interface/robot_interface.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/robot_interface/models/mission/task.py b/src/robot_interface/models/mission/task.py index 623fe97b..60e86552 100644 --- a/src/robot_interface/models/mission/task.py +++ b/src/robot_interface/models/mission/task.py @@ -1,6 +1,6 @@ from dataclasses import dataclass, field from enum import Enum -from typing import Iterator, Literal, Optional, Type, Union +from typing import Literal, Optional, Type, Union from alitra import Pose, Position diff --git a/src/robot_interface/robot_interface.py b/src/robot_interface/robot_interface.py index 3255ef1e..c6ce8e98 100644 --- a/src/robot_interface/robot_interface.py +++ b/src/robot_interface/robot_interface.py @@ -1,7 +1,7 @@ from abc import ABCMeta, abstractmethod from queue import Queue from threading import Thread -from typing import Callable, List +from typing import Callable, List, Optional from robot_interface.models.robots.media import MediaConfig from robot_interface.models.initialize import InitializeParams @@ -226,7 +226,7 @@ def initialize(self, params: InitializeParams) -> None: raise NotImplementedError @abstractmethod - def generate_media_config(self) -> MediaConfig: + def generate_media_config(self) -> Optional[MediaConfig]: """ Generate a JSON containing the url and token needed to establish a media stream connection to a robot.