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:
Leonid Pershin
2026-06-07 06:33:00 +03:00
parent 9c471ca701
commit ac02ca27a8
16 changed files with 81 additions and 105 deletions
+2 -2
View File
@@ -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
+2 -3
View File
@@ -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)