Apply Ruff 0.9.0 (#18622)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2025-01-10 00:05:09 +01:00 committed by GitHub
parent cc1e77138c
commit 3902e740cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 69 additions and 65 deletions

View file

@ -367,7 +367,7 @@ class BasePredictor:
# Save videos and streams
if self.dataset.mode in {"stream", "video"}:
fps = self.dataset.fps if self.dataset.mode == "video" else 30
frames_path = f'{save_path.split(".", 1)[0]}_frames/'
frames_path = f"{save_path.split('.', 1)[0]}_frames/"
if save_path not in self.vid_writer: # new video
if self.args.save_frames:
Path(frames_path).mkdir(parents=True, exist_ok=True)