Skip to content

Commit

Permalink
kwargs.pop => get for src_width/height args
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Aug 7, 2024
1 parent c2bda9e commit baeeeb6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vskernels/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ def __call__(
def for_scale(
self, clip: vs.VideoNode, width: int, height: int, shift: tuple[float, float], **kwargs: Any
) -> tuple[KwargsT, tuple[float, float]]:
src_width = kwargs.pop('src_width', width)
src_height = kwargs.pop('src_height', height)
src_width = kwargs.get('src_width', width)
src_height = kwargs.get('src_height', height)

return self(src_width, src_height, width, height, shift)

def for_descale(
self, clip: vs.VideoNode, width: int, height: int, shift: tuple[float, float], **kwargs: Any
) -> tuple[KwargsT, tuple[float, float]]:
src_width = kwargs.pop('src_width', clip.width)
src_height = kwargs.pop('src_height', clip.height)
src_width = kwargs.get('src_width', clip.width)
src_height = kwargs.get('src_height', clip.height)

return self(width, height, src_width, src_height, shift)

Expand Down

0 comments on commit baeeeb6

Please sign in to comment.