Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
zrezke committed Jun 9, 2024
1 parent 278660c commit 0a3487f
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions rerun_py/depthai_viewer/_backend/device_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ 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,
Expand Down Expand Up @@ -270,16 +268,16 @@ def dict(self, *args, **kwargs) -> Dict[str, Any]: # type: ignore[no-untyped-de

def to_dai(self) -> dai.RawToFConfig:
cfg = dai.RawToFConfig()
cfg.median = self.median # type: ignore[attr-defined]
cfg.median = self.median # type: ignore[attr-defined, assignment]
cfg.phaseUnwrappingLevel = self.phase_unwrapping_level # type: ignore[attr-defined]
cfg.phaseUnwrapErrorThreshold = self.phase_unwrap_error_threshold # type: ignore[attr-defined]
cfg.enableFPPNCorrection = self.enable_fppn_correction # type: ignore[attr-defined]
cfg.enableOpticalCorrection = self.enable_optical_correction # type: ignore[attr-defined]
cfg.enableTemperatureCorrection = self.enable_temperature_correction # type: ignore[attr-defined]
cfg.enableWiggleCorrection = self.enable_wiggle_correction # type: ignore[attr-defined]
cfg.enablePhaseUnwrapping = self.enable_phase_unwrapping # type: ignore[attr-defined]
cfg.enablePhaseShuffleTemporalFilter = self.enable_phase_shuffle_temporal_filter # type: ignore[attr-defined]
cfg.enableBurstMode = self.enable_burst_mode # type: ignore[attr-defined]
cfg.enableFPPNCorrection = self.enable_fppn_correction # type: ignore[attr-defined, assignment]
cfg.enableOpticalCorrection = self.enable_optical_correction # type: ignore[attr-defined, assignment]
cfg.enableTemperatureCorrection = self.enable_temperature_correction # type: ignore[attr-defined, assignment]
cfg.enableWiggleCorrection = self.enable_wiggle_correction # type: ignore[attr-defined, assignment]
cfg.enablePhaseUnwrapping = self.enable_phase_unwrapping # type: ignore[attr-defined, assignment]
cfg.enablePhaseShuffleTemporalFilter = self.enable_phase_shuffle_temporal_filter # type: ignore[attr-defined, assignment]
cfg.enableBurstMode = self.enable_burst_mode # type: ignore[attr-defined, assignment]
return cfg


Expand Down Expand Up @@ -332,9 +330,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()

Expand Down

0 comments on commit 0a3487f

Please sign in to comment.