Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Apr 29, 2024
1 parent d97f3cc commit 1b913ba
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions mvsfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
from vapoursynth import core
import functools
import math
from collections.abc import Iterable, Sequence, MutableSequence
from collections.abc import Iterable, Sequence
import typing


Expand Down Expand Up @@ -1151,7 +1151,7 @@ def BM3D(
## default: 6
################################################################################################################################
def VFRSplice(
clips: list[vs.VideoNode],
clips: vs.VideoNode | Sequence[vs.VideoNode],
tcfile: str | None = None,
v2: bool | None = None,
precision: int | None = None
Expand Down Expand Up @@ -1691,7 +1691,7 @@ def FilterCombed(src: vs.VideoNode, flt: vs.VideoNode, props: vs.VideoNode | Non
def Min(
clip1: vs.VideoNode,
clip2: vs.VideoNode,
mode: Sequence[int] | None = None,
mode: list[int] | None = None,
neutral: int | float | None = None
) -> vs.VideoNode:
return _operator2(clip1, clip2, mode, neutral, 'Min')
Expand Down Expand Up @@ -1722,7 +1722,7 @@ def Min(
def Max(
clip1: vs.VideoNode,
clip2: vs.VideoNode,
mode: Sequence[int] | None = None,
mode: list[int] | None = None,
neutral: int | float | None = None
) -> vs.VideoNode:
return _operator2(clip1, clip2, mode, neutral, 'Max')
Expand All @@ -1747,7 +1747,7 @@ def Max(
def Avg(
clip1: vs.VideoNode,
clip2: vs.VideoNode,
mode: Sequence[int] | None = None
mode: list[int] | None = None
) -> vs.VideoNode:
return _operator2(clip1, clip2, mode, None, 'Avg')
################################################################################################################################
Expand Down Expand Up @@ -2784,7 +2784,7 @@ def GrayScale(clip: vs.VideoNode, matrix: int | str | None = None) -> vs.VideoNo
## default chroma resampler: kernel="bicubic", a1=0, a2=0.5, also known as "Catmull-Rom"
################################################################################################################################
def Preview(
clips: Sequence[vs.VideoNode],
clips: vs.VideoNode | Sequence[vs.VideoNode],
plane: Sequence[int] | None = None,
matrix: int | str | None = None,
full: bool | None = None,
Expand Down Expand Up @@ -2851,8 +2851,8 @@ def _Conv(clip):
################################################################################################################################
def CheckColorFamily(
color_family: vs.ColorFamily,
valid_list: Sequence[str] | None = None,
invalid_list: Sequence[str] | None = None
valid_list: Iterable[str] | None = None,
invalid_list: Iterable[str] | None = None
) -> None:
if valid_list is None:
valid_list = ('RGB', 'YUV', 'GRAY')
Expand Down Expand Up @@ -3085,8 +3085,8 @@ def _quantization_conversion(
# Expression function
def gen_expr(chroma, mode):
if dSType == vs.INTEGER:
exprLower = 0
exprUpper = 1 << (dFormat.bytes_per_sample * 8) - 1
exprLower: int | float = 0
exprUpper: int | float = 1 << (dFormat.bytes_per_sample * 8) - 1
else:
exprLower = float('-inf')
exprUpper = float('inf')
Expand Down Expand Up @@ -3171,7 +3171,7 @@ def _check_arg_prop(
def _operator2(
clip1: vs.VideoNode,
clip2: vs.VideoNode,
mode: Sequence[int] | None,
mode: list[int] | None,
neutral: int | float | None,
name: str
) -> vs.VideoNode:
Expand Down

0 comments on commit 1b913ba

Please sign in to comment.