mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-05-30 15:14:30 -07:00
Merge pull request #10956 from akx/len
Simplify a bunch of `len(x) > 0`/`len(x) == 0` style expressions
This commit is contained in:
commit
7a7a201d81
25 changed files with 47 additions and 48 deletions
|
|
@ -81,7 +81,7 @@ class UiSettings:
|
|||
opts.save(shared.config_filename)
|
||||
except RuntimeError:
|
||||
return opts.dumpjson(), f'{len(changed)} settings changed without save: {", ".join(changed)}.'
|
||||
return opts.dumpjson(), f'{len(changed)} settings changed{": " if len(changed) > 0 else ""}{", ".join(changed)}.'
|
||||
return opts.dumpjson(), f'{len(changed)} settings changed{": " if changed else ""}{", ".join(changed)}.'
|
||||
|
||||
def run_settings_single(self, value, key):
|
||||
if not opts.same_type(value, opts.data_labels[key].default):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue