From 4417592b6bceb093c04772d12e8973079d6d79b7 Mon Sep 17 00:00:00 2001 From: Mohamed Date: Tue, 29 Apr 2025 17:39:52 +0200 Subject: [PATCH 1/2] Fix: Correct line length error in setup wizard label Split long string literal in the Minimum Skip Length label to adhere to maximum line length constraints (FLK-E501) --- src/iSponsorBlockTV/setup_wizard.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/iSponsorBlockTV/setup_wizard.py b/src/iSponsorBlockTV/setup_wizard.py index 4650d3d..2af7a69 100644 --- a/src/iSponsorBlockTV/setup_wizard.py +++ b/src/iSponsorBlockTV/setup_wizard.py @@ -733,7 +733,11 @@ class MinimumSkipLengthManager(Vertical): def compose(self) -> ComposeResult: yield Label("Minimum Skip Length", classes="title") yield Label( - "Specify the minimum length a segment must meet in order to skip it (in seconds). Default is 1 second; entering 0 will skip all segments.", + ( + "Specify the minimum length a segment must meet in order to skip " + "it (in seconds). Default is 1 second; entering 0 will skip all " + "segments." + ), classes="subtitle", ) yield Input( From 82ce3e60e9f416de3db0d000e6df5bfefed2419d Mon Sep 17 00:00:00 2001 From: Mohamed Date: Tue, 29 Apr 2025 17:52:11 +0200 Subject: [PATCH 2/2] Remove redundant code for minimum skip length configuration --- src/iSponsorBlockTV/config_setup.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/iSponsorBlockTV/config_setup.py b/src/iSponsorBlockTV/config_setup.py index 0150ce0..7c87272 100644 --- a/src/iSponsorBlockTV/config_setup.py +++ b/src/iSponsorBlockTV/config_setup.py @@ -203,18 +203,6 @@ def main(config, debug: bool) -> None: config.minimum_skip_length = minimum_skip_length - # Ask for minimum skip length. Confirm input is an integer - while True: - try: - minimum_skip_length = int( - input("Enter minimum length of segment to skip in seconds: ") - ) - break - except ValueError: - print("You entered a non integer value, try again.") - continue - config.minimum_skip_length = minimum_skip_length - choice = get_yn_input(REPORT_SKIPPED_SEGMENTS_PROMPT) config.skip_count_tracking = choice != "n"