Skip to content

Commit

Permalink
pylints
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Jeretina committed Sep 26, 2024
1 parent b6cd823 commit bf2af82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 0 additions & 3 deletions rerun_py/depthai_viewer/_backend/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
from typing import Dict, List, Optional, Tuple

import depthai as dai
import numpy as np
from depthai_sdk import OakCamera
from depthai_sdk.classes.packet_handlers import ComponentOutput
from depthai_sdk.components import CameraComponent, NNComponent, StereoComponent
from depthai_sdk.components.camera_helper import getClosestIspScale
from depthai_sdk.components.tof_component import Component, ToFComponent
from numpy.typing import NDArray

import depthai_viewer as viewer
from depthai_viewer._backend.device_configuration import (
Expand Down Expand Up @@ -115,7 +113,6 @@ def set_oak(self, oak_cam: Optional[OakCamera]) -> None:
def is_closed(self) -> bool:
return self._oak is not None and self._oak.device.isClosed()


def _get_possible_stereo_pairs_for_cam(
self, cam: dai.CameraFeatures, connected_camera_features: List[dai.CameraFeatures]
) -> List[dai.CameraBoardSocket]:
Expand Down
13 changes: 8 additions & 5 deletions rerun_py/depthai_viewer/_backend/packet_handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Callable, List, Optional, Tuple, Union
from typing import Dict, List, Optional, Tuple, Union

import cv2
import depthai as dai
Expand Down Expand Up @@ -29,7 +29,6 @@
from depthai_viewer._backend.store import Store
from depthai_viewer._backend.topic import Topic
from depthai_viewer.components.rect2d import RectFormat
from typing import Dict


class PacketHandlerContext(BaseModel): # type: ignore[misc]
Expand Down Expand Up @@ -183,7 +182,9 @@ def _log_img_frame(
) -> None:
"""
Log an image frame to the viewer.
Optionally undistort and rectify the image using the provided intrinsic matrix and distortion coefficients.
Optionally undistort and rectify the image using the provided intrinsic matrix
and distortion coefficients.
"""
viewer.log_rigid3(
f"{board_socket.name}/transform", child_from_parent=([0, 0, 0], [1, 0, 0, 0]), xyz="RDF"
Expand All @@ -208,8 +209,10 @@ def _log_img_frame(

child_from_parent: NDArray[np.float32]
try:
child_from_parent = self._calibration_handler.get_intrinsic_matrix( # type: ignore[call-arg, misc, arg-type]
board_socket, w, h # type: ignore[call-arg, misc, arg-type]
child_from_parent = (
self._calibration_handler.get_intrinsic_matrix( # type: ignore[call-arg, misc, arg-type]
board_socket, w, h # type: ignore[call-arg, misc, arg-type]
)
)
except Exception:
f_len = (w * h) ** 0.5
Expand Down

0 comments on commit bf2af82

Please sign in to comment.