refactor: Update build_custom_component_template return type
Update the return type of the build_custom_component_template function in utils.py to include the possibility of returning a Component object. This change ensures that the function can handle both CustomComponent and Component objects, improving flexibility and compatibility.
This commit is contained in:
parent
95d666636b
commit
69b756c35b
1 changed files with 1 additions and 1 deletions
|
|
@ -385,7 +385,7 @@ def build_custom_component_template_from_inputs(
|
|||
def build_custom_component_template(
|
||||
custom_component: CustomComponent,
|
||||
user_id: Optional[Union[str, UUID]] = None,
|
||||
) -> Tuple[Dict[str, Any], CustomComponent]:
|
||||
) -> Tuple[Dict[str, Any], CustomComponent | Component]:
|
||||
"""Build a custom component template"""
|
||||
try:
|
||||
if "inputs" in custom_component.template_config:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue