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

Function generate_union

dash/development/_py_prop_typing.py:79–85  ·  view source on GitHub ↗
(type_info, component_name: str, prop_name: str)

Source from the content-addressed store, hash-verified

77
78
79def generate_union(type_info, component_name: str, prop_name: str):
80 types = []
81 for union in type_info["value"]:
82 u_type = get_prop_typing(union["name"], component_name, prop_name, union)
83 if u_type not in types:
84 types.append(u_type)
85 return f"typing.Union[{', '.join(types)}]"
86
87
88def generate_tuple(

Callers

nothing calls this directly

Calls 2

get_prop_typingFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…