MCPcopy Index your code
hub / github.com/plotly/dash / extract_callback_args

Function extract_callback_args

dash/dependencies.py:366–378  ·  view source on GitHub ↗

Extract arguments for callback from a name and type

(args, kwargs, name, type_)

Source from the content-addressed store, hash-verified

364
365
366def extract_callback_args(args, kwargs, name, type_):
367 """Extract arguments for callback from a name and type"""
368 parameters = kwargs.get(name, [])
369 if parameters:
370 if not isinstance(parameters, (list, tuple)):
371 # accept a single item, not wrapped in a list, for any of the
372 # categories as a named arg (even though previously only output
373 # could be given unwrapped)
374 return [parameters]
375 else:
376 while args and isinstance(args[0], type_):
377 parameters.append(args.pop(0))
378 return parameters
379
380
381def handle_callback_args(args, kwargs):

Callers 1

handle_callback_argsFunction · 0.85

Calls 3

popMethod · 0.80
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…