From 5168462c5ed471ded8ecc9b66e90fb47886b1deb Mon Sep 17 00:00:00 2001 From: zrezke Date: Sat, 8 Jun 2024 15:49:33 +0200 Subject: [PATCH] Lints --- crates/re_viewer/src/depthai/depthai.rs | 1 + .../depthai_viewer/_backend/device_configuration.py | 10 ++++++---- rerun_py/depthai_viewer/components/tensor.py | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/re_viewer/src/depthai/depthai.rs b/crates/re_viewer/src/depthai/depthai.rs index c90b9f8af0ae..acd1b39b2b9b 100644 --- a/crates/re_viewer/src/depthai/depthai.rs +++ b/crates/re_viewer/src/depthai/depthai.rs @@ -856,6 +856,7 @@ impl State { pub fn get_connected_cameras(&self) -> &Vec { &self.selected_device.cameras } + pub fn get_connected_cameras_mut(&mut self) -> &mut Vec { &mut self.selected_device.cameras } diff --git a/rerun_py/depthai_viewer/_backend/device_configuration.py b/rerun_py/depthai_viewer/_backend/device_configuration.py index 4af9b53e1c76..0982454ef3db 100644 --- a/rerun_py/depthai_viewer/_backend/device_configuration.py +++ b/rerun_py/depthai_viewer/_backend/device_configuration.py @@ -56,7 +56,9 @@ def to_runtime_controls(self) -> Dict[str, Any]: "align": ( "RECTIFIED_LEFT" if self.align == dai.CameraBoardSocket.LEFT - else "RECTIFIED_RIGHT" if self.align == dai.CameraBoardSocket.RIGHT else "CENTER" + else "RECTIFIED_RIGHT" + if self.align == dai.CameraBoardSocket.RIGHT + else "CENTER" ), "lr_check": self.lr_check, "lrc_check_threshold": self.lrc_threshold, @@ -332,9 +334,9 @@ class DeviceProperties(BaseModel): # type: ignore[misc] id: str cameras: List[CameraFeatures] = [] imu: Optional[ImuKind] - stereo_pairs: List[Tuple[dai.CameraBoardSocket, dai.CameraBoardSocket]] = ( - [] - ) # Which cameras can be paired for stereo + stereo_pairs: List[ + Tuple[dai.CameraBoardSocket, dai.CameraBoardSocket] + ] = [] # Which cameras can be paired for stereo default_stereo_pair: Optional[Tuple[dai.CameraBoardSocket, dai.CameraBoardSocket]] = None info: DeviceInfo = DeviceInfo() diff --git a/rerun_py/depthai_viewer/components/tensor.py b/rerun_py/depthai_viewer/components/tensor.py index d376817308ba..39a17b36fd50 100644 --- a/rerun_py/depthai_viewer/components/tensor.py +++ b/rerun_py/depthai_viewer/components/tensor.py @@ -7,6 +7,7 @@ import numpy as np import numpy.typing as npt import pyarrow as pa + from depthai_viewer import bindings from depthai_viewer.components import ( REGISTERED_COMPONENT_NAMES,