From b13d199ce55ab87949d168eb16cfcff3ea0e27ba Mon Sep 17 00:00:00 2001 From: Setsugennoao <41454651+Setsugennoao@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:23:32 +0200 Subject: [PATCH] Change taps typehint Fix #36 --- vskernels/kernels/various.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vskernels/kernels/various.py b/vskernels/kernels/various.py index f1bb2d9..dca6968 100644 --- a/vskernels/kernels/various.py +++ b/vskernels/kernels/various.py @@ -74,7 +74,7 @@ class Lanczos(CustomComplexTapsKernel): :param taps: taps param for lanczos kernel """ - def __init__(self, taps: int = 3, **kwargs: Any) -> None: + def __init__(self, taps: float = 3, **kwargs: Any) -> None: super().__init__(taps, **kwargs) @inject_self.cached @@ -87,7 +87,7 @@ def kernel(self, *, x: float) -> float: class Gaussian(CustomComplexTapsKernel): """Gaussian resizer.""" - def __init__(self, sigma: float = 0.5, taps: int = 2, **kwargs: Any) -> None: + def __init__(self, sigma: float = 0.5, taps: float = 2, **kwargs: Any) -> None: """Sigma is the same as imagemagick's sigma scaling.""" self._sigma = sigma @@ -116,7 +116,7 @@ def kernel(self, *, x: float) -> float: class BlackMan(CustomComplexTapsKernel): """Blackman resizer.""" - def __init__(self, taps: int = 4, **kwargs: Any) -> None: + def __init__(self, taps: float = 4, **kwargs: Any) -> None: super().__init__(taps, **kwargs) def _win_coef(self, x: float) -> float: @@ -144,7 +144,7 @@ def _win_coef(self, x: float) -> float: class Sinc(CustomComplexTapsKernel): """Sinc resizer.""" - def __init__(self, taps: int = 4, **kwargs: Any) -> None: + def __init__(self, taps: float = 4, **kwargs: Any) -> None: super().__init__(taps, **kwargs) @inject_self.cached