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

Function validate_callback_arg

dash/_validate.py:54–85  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

52
53
54def validate_callback_arg(arg):
55 if not isinstance(getattr(arg, "component_property", None), str):
56 raise exceptions.IncorrectTypeException(
57 dedent(
58 f"""
59 component_property must be a string, found {arg.component_property!r}
60 """
61 )
62 )
63
64 if hasattr(arg, "component_event"):
65 raise exceptions.NonExistentEventException(
66 """
67 Events have been removed.
68 Use the associated property instead.
69 """
70 )
71
72 if isinstance(arg.component_id, dict):
73 validate_id_dict(arg)
74
75 elif isinstance(arg.component_id, str):
76 validate_id_string(arg)
77
78 else:
79 raise exceptions.IncorrectTypeException(
80 dedent(
81 f"""
82 component_id must be a string or dict, found {arg.component_id!r}
83 """
84 )
85 )
86
87
88def validate_id_dict(arg):

Callers 1

validate_callbackFunction · 0.85

Calls 2

validate_id_dictFunction · 0.85
validate_id_stringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…