From 7c31778780a784193a8ca3312abe0873d75f4108 Mon Sep 17 00:00:00 2001 From: Jitterbug <3130448+JuniorIsAJitterbug@users.noreply.github.com> Date: Sat, 8 Jun 2024 08:04:21 +0100 Subject: [PATCH] Allow active line opts individually --- src/tbc_video_export/opts/opt_validators.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/tbc_video_export/opts/opt_validators.py b/src/tbc_video_export/opts/opt_validators.py index d8b2ade..c6a0a17 100644 --- a/src/tbc_video_export/opts/opt_validators.py +++ b/src/tbc_video_export/opts/opt_validators.py @@ -44,17 +44,13 @@ def _validate_line_opts(parser: argparse.ArgumentParser, opts: Opts) -> None: "last_active_frame_line", ] - if any(getattr(opts, x) is not None for x in field_frame_opts): - if opts.vbi or opts.full_vertical or opts.letterbox: - parser.error( - "arguments [--vbi | --letterbox]: not allowed with arguments " - "[--ffll | --lfll | --ffrl | --lfrl]" - ) - elif not all(getattr(opts, x) is not None for x in field_frame_opts): - parser.error( - "the following arguments are required: " - "[--ffll & --lfll & --ffrl & --lfrl]" - ) + if any(getattr(opts, x) is not None for x in field_frame_opts) and ( + opts.vbi or opts.full_vertical or opts.letterbox + ): + parser.error( + "arguments [--vbi | --letterbox]: not allowed with arguments " + "[--ffll | --lfll | --ffrl | --lfrl]" + ) def _validate_video_system(