diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 05:25:25 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 05:25:25 +0000 |
commit | 96d6ca4199e7c5eee8d451618de5161cea317c40 (patch) | |
tree | 8f101a345bcd1d66f4047b5e20918e2058e4dc7c /modules/images.py | |
parent | 762265eab58cdb8f2d6398769bab43d8b8db0075 (diff) | |
download | stable-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.py | 4 |
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
|