Skip to content

Commit

Permalink
Fix Ruff Blank line contains whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
anapnoe committed Oct 3, 2024
1 parent 957bb29 commit bb1d864
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def register_category(self, category_id, label, position=None):

# 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}
Expand Down
4 changes: 2 additions & 2 deletions modules/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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))
Expand Down

0 comments on commit bb1d864

Please sign in to comment.