Skip to content

Commit bfa083c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3f0be58 commit bfa083c

File tree

1 file changed

+7
-4
lines changed
  • lerobot/common/robot_devices/cameras

1 file changed

+7
-4
lines changed

lerobot/common/robot_devices/cameras/opencv.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,13 @@ def connect(self):
286286
cv2.setNumThreads(1)
287287

288288
backend = (
289-
cv2.CAP_V4L2 if platform.system() == "Linux" else
290-
cv2.CAP_DSHOW if platform.system() == "Windows" else
291-
cv2.CAP_AVFOUNDATION if platform.system() == "Darwin" else
292-
cv2.CAP_ANY
289+
cv2.CAP_V4L2
290+
if platform.system() == "Linux"
291+
else cv2.CAP_DSHOW
292+
if platform.system() == "Windows"
293+
else cv2.CAP_AVFOUNDATION
294+
if platform.system() == "Darwin"
295+
else cv2.CAP_ANY
293296
)
294297

295298
camera_idx = f"/dev/video{self.camera_index}" if platform.system() == "Linux" else self.camera_index

0 commit comments

Comments
 (0)