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

Function get_prop_typing

dash/development/_py_prop_typing.py:152–175  ·  view source on GitHub ↗
(
    type_name: str,
    component_name: str,
    prop_name: str,
    type_info,
    custom_props=None,
    custom_ignore=None,
)

Source from the content-addressed store, hash-verified

150
151
152def get_prop_typing(
153 type_name: str,
154 component_name: str,
155 prop_name: str,
156 type_info,
157 custom_props=None,
158 custom_ignore=None,
159):
160 if prop_name == "id":
161 # Id is always the same either a string or a dict for pattern matching.
162 return "typing.Union[str, dict]"
163
164 if custom_props:
165 special = _get_custom_prop(custom_props, component_name, prop_name)
166 if special:
167 return special(type_info, component_name, prop_name)
168
169 if custom_ignore and prop_name in custom_ignore:
170 return "typing.Any"
171
172 prop_type = PROP_TYPING.get(type_name, generate_any)(
173 type_info, component_name, prop_name
174 )
175 return prop_type
176
177
178PROP_TYPING = {

Callers 7

generate_class_stringFunction · 0.85
generate_shapeFunction · 0.85
generate_unionFunction · 0.85
generate_tupleFunction · 0.85
generate_array_ofFunction · 0.85
generate_object_ofFunction · 0.85

Calls 2

_get_custom_propFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…