Refactor HVideoTool's configuration and project management: updated project handling in core/project.py, streamlined restoration settings in config.py, and improved documentation in CLAUDE.md. Removed unused parameters and enhanced type hints for better clarity.
This commit is contained in:
@@ -18,8 +18,8 @@ from __future__ import annotations
|
||||
|
||||
import shutil
|
||||
import subprocess
|
||||
from collections.abc import Callable
|
||||
from pathlib import Path
|
||||
from typing import Callable
|
||||
|
||||
import cv2
|
||||
|
||||
@@ -38,7 +38,7 @@ def _find_ffmpeg() -> str | None:
|
||||
import imageio_ffmpeg
|
||||
|
||||
return imageio_ffmpeg.get_ffmpeg_exe()
|
||||
except Exception: # noqa: BLE001 - package missing or no bundled binary
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Decoded video frame passed from the reader to the detector."""
|
||||
"""Image passed to the detector — the ``Detector.detect`` input type."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -10,5 +10,4 @@ import numpy as np
|
||||
@dataclass
|
||||
class Frame:
|
||||
image: np.ndarray # BGR, HxWx3, uint8 (OpenCV convention)
|
||||
index: int # 0-based frame counter since the last open/seek
|
||||
pts: float # presentation timestamp, seconds
|
||||
index: int = 0 # 0-based position in the sequence (informational)
|
||||
|
||||
Reference in New Issue
Block a user