diff --git a/src/isar/apis/robot_control/robot_controller.py b/src/isar/apis/robot_control/robot_controller.py index b7900314..182d42a8 100644 --- a/src/isar/apis/robot_control/robot_controller.py +++ b/src/isar/apis/robot_control/robot_controller.py @@ -2,9 +2,7 @@ from injector import inject -from isar.apis.models.models import ( - RobotInfoResponse, -) +from isar.apis.models.models import RobotInfoResponse from isar.config.settings import robot_settings, settings from isar.services.utilities.robot_utilities import RobotUtilities diff --git a/src/isar/apis/schedule/scheduling_controller.py b/src/isar/apis/schedule/scheduling_controller.py index b950bbfc..33228f2e 100644 --- a/src/isar/apis/schedule/scheduling_controller.py +++ b/src/isar/apis/schedule/scheduling_controller.py @@ -7,11 +7,7 @@ from injector import inject from isar.apis.models import InputPose, StartMissionResponse -from isar.apis.models.models import ( - ControlMissionResponse, - RobotInfoResponse, - TaskResponse, -) +from isar.apis.models.models import ControlMissionResponse, TaskResponse from isar.apis.models.start_mission_definition import ( StartMissionDefinition, to_isar_mission, diff --git a/src/isar/mission_planner/sequential_task_selector.py b/src/isar/mission_planner/sequential_task_selector.py index b6041e8c..08c460de 100644 --- a/src/isar/mission_planner/sequential_task_selector.py +++ b/src/isar/mission_planner/sequential_task_selector.py @@ -4,7 +4,7 @@ TaskSelectorInterface, TaskSelectorStop, ) -from robot_interface.models.mission.task import TASKS, Task +from robot_interface.models.mission.task import TASKS class SequentialTaskSelector(TaskSelectorInterface): diff --git a/src/isar/mission_planner/task_selector_interface.py b/src/isar/mission_planner/task_selector_interface.py index 15c075c2..0b01d668 100644 --- a/src/isar/mission_planner/task_selector_interface.py +++ b/src/isar/mission_planner/task_selector_interface.py @@ -1,7 +1,7 @@ from abc import ABCMeta, abstractmethod from typing import List -from robot_interface.models.mission.task import TASKS, Task +from robot_interface.models.mission.task import TASKS class TaskSelectorInterface(metaclass=ABCMeta): diff --git a/src/isar/state_machine/states/monitor.py b/src/isar/state_machine/states/monitor.py index 99da316f..57f577db 100644 --- a/src/isar/state_machine/states/monitor.py +++ b/src/isar/state_machine/states/monitor.py @@ -110,7 +110,8 @@ def _run(self) -> None: if not isinstance(status, TaskStatus): self.logger.error( - f"Received an invalid status update when monitoring mission. Only TaskStatus is expected." + f"Received an invalid status update {status} when monitoring mission. " + "Only TaskStatus is expected." ) break diff --git a/src/robot_interface/models/inspection/__init__.py b/src/robot_interface/models/inspection/__init__.py index 3bcb7748..e69de29b 100644 --- a/src/robot_interface/models/inspection/__init__.py +++ b/src/robot_interface/models/inspection/__init__.py @@ -1,13 +0,0 @@ -from .inspection import ( - Audio, - Image, - ImageMetadata, - Inspection, - InspectionMetadata, - ThermalImage, - ThermalImageMetadata, - ThermalVideo, - ThermalVideoMetadata, - Video, - VideoMetadata, -) diff --git a/src/robot_interface/models/mission/task.py b/src/robot_interface/models/mission/task.py index b68c4bea..fb620181 100644 --- a/src/robot_interface/models/mission/task.py +++ b/src/robot_interface/models/mission/task.py @@ -5,7 +5,7 @@ from pydantic import BaseModel, Field from robot_interface.models.exceptions.robot_exceptions import ErrorMessage -from robot_interface.models.inspection import ( +from robot_interface.models.inspection.inspection import ( Audio, Image, Inspection, diff --git a/tests/isar/state_machine/test_state_machine.py b/tests/isar/state_machine/test_state_machine.py index 889aa8d2..75cbf04a 100644 --- a/tests/isar/state_machine/test_state_machine.py +++ b/tests/isar/state_machine/test_state_machine.py @@ -1,6 +1,5 @@ import time from collections import deque -from pathlib import Path from threading import Thread from typing import List @@ -8,8 +7,6 @@ from injector import Injector from pytest_mock import MockerFixture -from isar.config.settings import settings -from isar.mission_planner.local_planner import LocalPlanner from isar.models.communication.queues.queues import Queues from isar.services.utilities.scheduling_utilities import SchedulingUtilities from isar.state_machine.state_machine import StateMachine, main @@ -32,7 +29,6 @@ class StateMachineThread(object): def __init__(self, injector) -> None: - # settings.UPLOAD_INSPECTIONS_ASYNC = False self.injector: Injector = injector self.state_machine: StateMachine = injector.get(StateMachine) self._thread: Thread = Thread(target=main, args=[self.state_machine])