Skip to content

Commit

Permalink
[bugfix] Fix incorrect type hint leading to runtime failures #468
Browse files Browse the repository at this point in the history
  • Loading branch information
Breakthrough committed Dec 23, 2024
1 parent d7b0972 commit 69c1922
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scenedetect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

# Used for module identification and when printing version & about info
# (e.g. calling `scenedetect version` or `scenedetect about`).
__version__ = "0.6.5.1"
__version__ = "0.6.5.2"

init_logger()
logger = getLogger("pyscenedetect")
Expand Down
8 changes: 4 additions & 4 deletions scenedetect/scene_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,13 @@ def write_scene_list_html(


def _scale_image(
image: cv2.Mat,
image: np.ndarray,
aspect_ratio: float,
height: ty.Optional[int],
width: ty.Optional[int],
scale: ty.Optional[float],
interpolation: Interpolation,
) -> cv2.Mat:
) -> np.ndarray:
# TODO: Combine this resize with the ones below.
if aspect_ratio is not None:
image = cv2.resize(
Expand Down Expand Up @@ -709,9 +709,9 @@ def generate_timecode_list(self, scene_list: SceneList) -> ty.List[ty.Iterable[F

def resize_image(
self,
image: cv2.Mat,
image: np.ndarray,
aspect_ratio: float,
) -> cv2.Mat:
) -> np.ndarray:
return _scale_image(
image, aspect_ratio, self._height, self._width, self._scale, self._interpolation
)
Expand Down

0 comments on commit 69c1922

Please sign in to comment.