From 2f900ccbc8dce26d78bc3e7534817f880bff1ba3 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Mon, 23 Sep 2024 02:38:14 +0300 Subject: [PATCH] bytebeat_compiler.py: simplify the condition --- bytebeat_compiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bytebeat_compiler.py b/bytebeat_compiler.py index 602456b..d105c3f 100644 --- a/bytebeat_compiler.py +++ b/bytebeat_compiler.py @@ -339,7 +339,9 @@ if __name__ == "__main__": value if (value := args.final_sample_rate) else args.sample_rate # - Parse the '--skip-first' argument - if not args.skip_first is None: + if args.skip_first is None: + skip_first_samples = 0 + else: encountered_point = False encountered_s = False for character in args.skip_first: @@ -362,8 +364,6 @@ if __name__ == "__main__": skip_first += [0] skip_first_samples = skip_first[0] * actual_sample_rate + skip_first[1] - else: - skip_first_samples = 0 # round the number of skipped first samples skip_first_samples = ceil(skip_first_samples)