From c40c69645564c0b587a743f4d10ac15ade81ad52 Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Mon, 23 Oct 2023 00:09:28 +0200 Subject: [PATCH] flake8 --- vsdeinterlace/wobbly/wibbly.py | 4 ++-- vsdeinterlace/wobbly/wobbly.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vsdeinterlace/wobbly/wibbly.py b/vsdeinterlace/wobbly/wibbly.py index 037655a..a10ca35 100644 --- a/vsdeinterlace/wobbly/wibbly.py +++ b/vsdeinterlace/wobbly/wibbly.py @@ -6,7 +6,7 @@ from vstools import (CustomValueError, FunctionUtil, Keyframes, SceneChangeMode, SPath, SPathLike, clip_async_render, - core, get_prop, get_y, normalize_ranges, vs) + core, get_prop, get_y, normalize_ranges, vs, FramePropError) from .types import Types @@ -200,7 +200,7 @@ def to_file( if video_path is None: try: video_path = get_prop(self.clip, "idx_path", bytes).decode() - except: + except (FramePropError, TypeError): raise CustomValueError("You must pass a path to the video file!", self.to_file) video_path = SPath(video_path) diff --git a/vsdeinterlace/wobbly/wobbly.py b/vsdeinterlace/wobbly/wobbly.py index f98bbd4..153cfa8 100644 --- a/vsdeinterlace/wobbly/wobbly.py +++ b/vsdeinterlace/wobbly/wobbly.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from fractions import Fraction from math import ceil -from typing import Any, Literal +from typing import Any from vstools import (CustomValueError, FieldBased, FileNotExistsError, Keyframes, SPath, SPathLike, Timecodes, core, get_prop, replace_ranges, vs) @@ -229,7 +229,7 @@ def parse_wobbly( # TODO: throw a proper error later once I have to actually test this properly print(f"file mismatch ({idx_path} != {input_file})") - if bool(len(illegal_chars := set(matches) - {*FieldMatch.__args__})): # type:ignore[attr-defined] + if bool(len(illegal_chars := set(matches) - {*Types.Match.__args__})): # type:ignore[attr-defined] raise CustomValueError(f"Illegal characters found in matches {tuple(illegal_chars)}", parse_wobbly) fades = [(fade.get("frame"), fade.get("field difference")) for fade in (dict(f) for f in fades)]