Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, kernel: str, b: Union[float, int] = 0, c: Union[float, int] = 0, taps: int = 0):
"""
Get a scaler for getnative from descale
:param kernel: kernel for descale
:param b: b value for kernel "bicubic" (default 0)
:param c: c value for kernel "bicubic" (default 0)
:param taps: taps value for kernel "lanczos" (default 0)
"""
self.kernel = kernel
self.b = b
self.c = c
self.taps = taps
_d = plugin_from_identifier(core, "tegaf.asi.xe")
self.plugin = _d if _d is not None else get_attr(core, 'descale', None)
if self.plugin is None:
return
self.descaler = getattr(self.plugin, f'De{self.kernel}', None)
self.upscaler = getattr(core.resize, self.kernel.title())
self.check_input()
self.check_for_extra_paras()