From c9a61156347cdaceccee8f0125a16845dbbcd9ea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:59:57 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- socs/agents/hwp_supervisor/agent.py | 2 +- socs/testing/device_emulator.py | 4 ++-- tests/conftest.py | 4 +++- tests/integration/test_scpi_psu_agent_integration.py | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/socs/agents/hwp_supervisor/agent.py b/socs/agents/hwp_supervisor/agent.py index 63a38d930..25af88898 100644 --- a/socs/agents/hwp_supervisor/agent.py +++ b/socs/agents/hwp_supervisor/agent.py @@ -1476,7 +1476,7 @@ def monitor(self, session, params) -> Tuple[bool, str]: now = time.time() session.data['timestamp'] = now - ops = self.hwp_state.update(test_mode = test_mode) + ops = self.hwp_state.update(test_mode=test_mode) session.data['monitored_sessions'] = ops session.data['hwp_state'] = asdict(self.hwp_state) diff --git a/socs/testing/device_emulator.py b/socs/testing/device_emulator.py index cdb1062f1..61b85991c 100644 --- a/socs/testing/device_emulator.py +++ b/socs/testing/device_emulator.py @@ -335,8 +335,8 @@ def create_tcp_relay(self, port): self._type = 'tcp' self._sock_bound = False bkg_read = threading.Thread(name='background', - target=self._read_socket, - kwargs={'port': port}) + target=self._read_socket, + kwargs={'port': port}) bkg_read.start() # wait for socket to bind properly before returning diff --git a/tests/conftest.py b/tests/conftest.py index 535c91aae..52c78219a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,8 +1,10 @@ -import psutil import os + +import psutil import pytest + @pytest.fixture(autouse=True) def check_subprocesses(): # Get a list of child PIDs before the test starts diff --git a/tests/integration/test_scpi_psu_agent_integration.py b/tests/integration/test_scpi_psu_agent_integration.py index 26cc1849f..01b4ad791 100644 --- a/tests/integration/test_scpi_psu_agent_integration.py +++ b/tests/integration/test_scpi_psu_agent_integration.py @@ -1,9 +1,10 @@ +import time + import ocs import pytest from integration.util import docker_compose_file # noqa: F401 from integration.util import create_crossbar_fixture from ocs.base import OpCode -import time from ocs.testing import create_agent_runner_fixture, create_client_fixture from socs.testing.device_emulator import create_device_emulator