aboutsummaryrefslogtreecommitdiffstats
path: root/modules/images.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-10 05:25:25 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-05-10 05:25:25 +0000
commit96d6ca4199e7c5eee8d451618de5161cea317c40 (patch)
tree8f101a345bcd1d66f4047b5e20918e2058e4dc7c /modules/images.py
parent762265eab58cdb8f2d6398769bab43d8b8db0075 (diff)
downloadstable-diffusion-webui-gfx803-96d6ca4199e7c5eee8d451618de5161cea317c40.tar.gz
stable-diffusion-webui-gfx803-96d6ca4199e7c5eee8d451618de5161cea317c40.tar.bz2
stable-diffusion-webui-gfx803-96d6ca4199e7c5eee8d451618de5161cea317c40.zip
manual fixes for ruff
Diffstat (limited to 'modules/images.py')
-rw-r--r--modules/images.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/images.py b/modules/images.py
index 3d5d76cc..5eb6d855 100644
--- a/modules/images.py
+++ b/modules/images.py
@@ -472,9 +472,9 @@ def get_next_sequence_number(path, basename):
prefix_length = len(basename)
for p in os.listdir(path):
if p.startswith(basename):
- l = os.path.splitext(p[prefix_length:])[0].split('-') # splits the filename (removing the basename first if one is defined, so the sequence number is always the first element)
+ parts = os.path.splitext(p[prefix_length:])[0].split('-') # splits the filename (removing the basename first if one is defined, so the sequence number is always the first element)
try:
- result = max(int(l[0]), result)
+ result = max(int(parts[0]), result)
except ValueError:
pass