From 06af73bd1d17b417f234746c9a2f8e8e92cf6149 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Sat, 9 Sep 2023 10:23:53 +0300 Subject: [PATCH] linter --- modules/scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/scripts.py b/modules/scripts.py index f1f17a5f7..5c6e0226e 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -498,7 +498,7 @@ class ScriptRunner: choices = getattr(control, 'choices', None) # as of gradio 3.41, some items in choices are strings, and some are tuples where the first elem is the string if choices is not None: - setattr(arg_info, 'choices', [x[0] if isinstance(x, tuple) else x for x in choices]) + arg_info.choices = [x[0] if isinstance(x, tuple) else x for x in choices] api_args.append(arg_info)