From 673be87a2d449b4860adaf921679b68574e431c6 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Thu, 1 May 2025 15:19:33 +0200 Subject: [PATCH] chore(formatter): upgrade to black v25 --- ophyd_devices/devices/areadetector/cam.py | 3 +-- ophyd_devices/devices/delay_generator_645.py | 2 +- ophyd_devices/interfaces/base_classes/bec_device_base.py | 2 +- ophyd_devices/interfaces/protocols/bec_protocols.py | 8 ++++---- ophyd_devices/sim/sim_positioner.py | 2 +- ophyd_devices/tests/utils.py | 2 +- ophyd_devices/utils/bec_utils.py | 2 +- ophyd_devices/utils/errors.py | 2 +- pyproject.toml | 2 +- tests/test_simulation.py | 4 ++-- 10 files changed, 14 insertions(+), 15 deletions(-) diff --git a/ophyd_devices/devices/areadetector/cam.py b/ophyd_devices/devices/areadetector/cam.py index a47009e..b13b05f 100644 --- a/ophyd_devices/devices/areadetector/cam.py +++ b/ophyd_devices/devices/areadetector/cam.py @@ -1,5 +1,4 @@ -"""AreaDetector Devices -""" +"""AreaDetector Devices""" # isort: skip_file from ophyd import EpicsSignal, EpicsSignalRO, EpicsSignalWithRBV diff --git a/ophyd_devices/devices/delay_generator_645.py b/ophyd_devices/devices/delay_generator_645.py index ff5c8f3..e67f7f1 100644 --- a/ophyd_devices/devices/delay_generator_645.py +++ b/ophyd_devices/devices/delay_generator_645.py @@ -1,4 +1,4 @@ -""" Module for integrating the Stanford Research DG645 Delay Generator""" +"""Module for integrating the Stanford Research DG645 Delay Generator""" import enum import time diff --git a/ophyd_devices/interfaces/base_classes/bec_device_base.py b/ophyd_devices/interfaces/base_classes/bec_device_base.py index 15f535a..bc3d08c 100644 --- a/ophyd_devices/interfaces/base_classes/bec_device_base.py +++ b/ophyd_devices/interfaces/base_classes/bec_device_base.py @@ -1,6 +1,6 @@ """ This module contains the base class for custom device integrations at PSI. -Please check the device section in BEC's developer documentation +Please check the device section in BEC's developer documentation (https://bec.readthedocs.io/en/latest/) for more information about device integration. """ diff --git a/ophyd_devices/interfaces/protocols/bec_protocols.py b/ophyd_devices/interfaces/protocols/bec_protocols.py index 2b24eae..90ff554 100644 --- a/ophyd_devices/interfaces/protocols/bec_protocols.py +++ b/ophyd_devices/interfaces/protocols/bec_protocols.py @@ -1,8 +1,8 @@ -""" This module provides a range of protocols that describe the expected +"""This module provides a range of protocols that describe the expected interface for different types of devices. -The protocols below can be used as teamplates for functionality to be implemeted -by different type of devices. They further facilitate runtime checks on devices +The protocols below can be used as teamplates for functionality to be implemeted +by different type of devices. They further facilitate runtime checks on devices and provide a minimum set of properties required for a device to be loadable by BEC. The protocols are: @@ -13,7 +13,7 @@ The protocols are: - BECPositionerProtocol: Protocol for positioners. - BECFlyerProtocol: Protocol with for flyers. -Keep in mind, that a device of type flyer should generally also implement the BECDeviceProtocol +Keep in mind, that a device of type flyer should generally also implement the BECDeviceProtocol with the functionality needed for scans. In addition, flyers also implement the BECFlyerProtocol. Similarly, positioners should also implement the BECDeviceProtocol and BECPositionerProtocol. diff --git a/ophyd_devices/sim/sim_positioner.py b/ophyd_devices/sim/sim_positioner.py index 8939703..aaece4a 100644 --- a/ophyd_devices/sim/sim_positioner.py +++ b/ophyd_devices/sim/sim_positioner.py @@ -1,4 +1,4 @@ -""" Module for simulated positioner devices. """ +"""Module for simulated positioner devices.""" import threading import time as ttime diff --git a/ophyd_devices/tests/utils.py b/ophyd_devices/tests/utils.py index 231c3e0..a9940c8 100644 --- a/ophyd_devices/tests/utils.py +++ b/ophyd_devices/tests/utils.py @@ -1,4 +1,4 @@ -""" Utilities to mock and test devices.""" +"""Utilities to mock and test devices.""" from typing import TYPE_CHECKING from unittest import mock diff --git a/ophyd_devices/utils/bec_utils.py b/ophyd_devices/utils/bec_utils.py index 3319b1d..1982757 100644 --- a/ophyd_devices/utils/bec_utils.py +++ b/ophyd_devices/utils/bec_utils.py @@ -1,4 +1,4 @@ -""" Utility class linked to BEC""" +"""Utility class linked to BEC""" import time diff --git a/ophyd_devices/utils/errors.py b/ophyd_devices/utils/errors.py index d1ee140..685eda3 100644 --- a/ophyd_devices/utils/errors.py +++ b/ophyd_devices/utils/errors.py @@ -1,4 +1,4 @@ -"""Module for ophyd_devices specific errors. """ +"""Module for ophyd_devices specific errors.""" class DeviceStopError(Exception): diff --git a/pyproject.toml b/pyproject.toml index b618a6b..5542851 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ dev = [ "bec-server~=3.13", "pillow ~= 11.1", - "black~=24.0", + "black~=25.0", "isort~=5.13, >=5.13.2", "coverage~=7.0", "pylint~=3.0", diff --git a/tests/test_simulation.py b/tests/test_simulation.py index 7293f8b..1d6390a 100644 --- a/tests/test_simulation.py +++ b/tests/test_simulation.py @@ -524,7 +524,7 @@ def test_proxy_config_and_props_stay_in_sync(h5proxy_fixture: tuple[H5ImageRepla def test_stage_camera_proxy_image_moves_with_samx_and_samy( - stage_camera_proxy_fixture: tuple[StageCameraProxy, SimCamera, SimPositioner, SimPositioner] + stage_camera_proxy_fixture: tuple[StageCameraProxy, SimCamera, SimPositioner, SimPositioner], ): """Test camera stage proxy to compute readback from readback of positioner samx and samy""" proxy, camera, samx, samy = stage_camera_proxy_fixture @@ -542,7 +542,7 @@ def test_stage_camera_proxy_image_moves_with_samx_and_samy( def test_stage_camera_proxy_image_shape( - stage_camera_proxy_fixture: tuple[StageCameraProxy, SimCamera, SimPositioner, SimPositioner] + stage_camera_proxy_fixture: tuple[StageCameraProxy, SimCamera, SimPositioner, SimPositioner], ): """Make sure that the produced image has the same shape as the detector being proxied""" proxy, camera, samx, samy = stage_camera_proxy_fixture