From 92faa41ad7504952dd4b972ff7b6c117b3dacf39 Mon Sep 17 00:00:00 2001 From: Setsugennoao <41454651+Setsugennoao@users.noreply.github.com> Date: Sun, 5 Nov 2023 21:35:36 +0100 Subject: [PATCH] Fix keep_ar not being a bool --- vskernels/kernels/complex.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vskernels/kernels/complex.py b/vskernels/kernels/complex.py index d81e155..aa74dd0 100644 --- a/vskernels/kernels/complex.py +++ b/vskernels/kernels/complex.py @@ -91,7 +91,7 @@ def descale( # type: ignore[override] class KeepArScaler(Scaler): def _get_kwargs_keep_ar( - self, sar: Sar | float | bool | None = None, dar: Dar | float | bool | None = None, keep_ar: bool | None = None, + self, sar: Sar | float | bool | None = None, dar: Dar | float | bool | None = None, keep_ar: bool = False, **kwargs: Any ) -> KwargsT: kwargs = KwargsT(keep_ar=keep_ar, sar=sar, dar=dar) | kwargs @@ -156,7 +156,7 @@ def _handle_crop_resize_kwargs( # type: ignore[override] @inject_self.cached def scale( # type: ignore[override] self, clip: vs.VideoNode, width: int, height: int, shift: tuple[float, float] = (0, 0), *, - sar: Sar | float | bool | None = None, dar: Dar | float | bool | None = None, keep_ar: bool | None = None, + sar: Sar | float | bool | None = None, dar: Dar | float | bool | None = None, keep_ar: bool = False, **kwargs: Any ) -> vs.VideoNode: check_correct_subsampling(clip, width, height) @@ -181,7 +181,7 @@ class ComplexScaler(LinearScaler, KeepArScaler): def scale( # type: ignore[override] self, clip: vs.VideoNode, width: int, height: int, shift: tuple[float, float] = (0, 0), *, - sar: Sar | bool | float | None = None, dar: Dar | bool | float | None = None, keep_ar: bool | None = None, + sar: Sar | bool | float | None = None, dar: Dar | bool | float | None = None, keep_ar: bool = False, linear: bool = False, sigmoid: bool | tuple[float, float] = False, **kwargs: Any ) -> vs.VideoNode: