From bb1d8648117d3e4182604d0e85b758abc53196ea Mon Sep 17 00:00:00 2001 From: anapnoe <124302297+anapnoe@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:01:22 +0300 Subject: [PATCH] Fix Ruff Blank line contains whitespace --- modules/options.py | 2 +- modules/scripts.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/options.py b/modules/options.py index dfaf73f2..8fb8c86e 100644 --- a/modules/options.py +++ b/modules/options.py @@ -332,7 +332,7 @@ class OptionsCategories: # Use a dictionary to hold the categories temporarily temp_mapping = self.mapping.copy() - + # Insert the new category at the specified position if position is not None and position == 0: temp_mapping = {category_id: OptionsCategory(category_id, label), **temp_mapping} diff --git a/modules/scripts.py b/modules/scripts.py index 2b7eb4dc..982d78df 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -489,7 +489,7 @@ def custom_sort_key(filename): base = match.group(1) if match else filename suffix = match.group(2) if match else '' extension = match.group(3) if match else '' - + # 1. Base name # 2. Suffix (optional) return (base, suffix, extension) @@ -501,7 +501,7 @@ def list_files_with_prefix(prefix, file_extension): for dirpath in dirs: if not os.path.isdir(dirpath): continue - + for filename in os.listdir(dirpath): if filename.startswith(prefix) and filename.endswith(file_extension): res.append(os.path.join(dirpath, filename))