Merge pull request #10956 from akx/len

Simplify a bunch of `len(x) > 0`/`len(x) == 0` style expressions
This commit is contained in:
AUTOMATIC1111
2023-06-05 11:06:37 +03:00
committed by GitHub
25 changed files with 47 additions and 48 deletions

View File

@@ -281,7 +281,7 @@ class Api:
script_args[0] = selectable_idx + 1
# Now check for always on scripts
if request.alwayson_scripts and (len(request.alwayson_scripts) > 0):
if request.alwayson_scripts:
for alwayson_script_name in request.alwayson_scripts.keys():
alwayson_script = self.get_script(alwayson_script_name, script_runner)
if alwayson_script is None: