Skip to content

Commit c6dc6a8

Browse files
committed
lint a little more
1 parent 868cff3 commit c6dc6a8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

dash/dependencies.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def extract_callback_args(args, kwargs, name, type_):
147147
def handle_callback_args(args, kwargs):
148148
"""Split args into outputs, inputs and states"""
149149
prevent_initial_call = kwargs.get("prevent_initial_call", None)
150-
if prevent_initial_call is None and len(args) and isinstance(args[-1], bool):
150+
if prevent_initial_call is None and args and isinstance(args[-1], bool):
151151
prevent_initial_call = args.pop()
152152

153153
# flatten args, to support the older syntax where outputs, inputs, and states
@@ -158,7 +158,7 @@ def handle_callback_args(args, kwargs):
158158

159159
outputs = extract_callback_args(flat_args, kwargs, "output", Output)
160160
if len(outputs) == 1:
161-
out0 = kwargs.get("output", args[0] if len(args) else None)
161+
out0 = kwargs.get("output", args[0] if args else None)
162162
if not isinstance(out0, (list, tuple)):
163163
outputs = outputs[0]
164164

@@ -171,9 +171,5 @@ def handle_callback_args(args, kwargs):
171171
"then all Inputs, then all States. Trailing this we found:\n"
172172
+ repr(flat_args)
173173
)
174-
return [
175-
outputs,
176-
inputs,
177-
states,
178-
prevent_initial_call,
179-
]
174+
175+
return outputs, inputs, states, prevent_initial_call

0 commit comments

Comments
 (0)