refactor: Update FlowToolComponent to use plural variable names for flow_datas and flow_data in get_flow_names and get_flow methods
This commit is contained in:
parent
c0bc3bce63
commit
8defb43e1c
1 changed files with 4 additions and 4 deletions
|
|
@ -17,8 +17,8 @@ class FlowToolComponent(CustomComponent):
|
||||||
field_order = ["flow_name", "name", "description", "return_direct"]
|
field_order = ["flow_name", "name", "description", "return_direct"]
|
||||||
|
|
||||||
def get_flow_names(self) -> List[str]:
|
def get_flow_names(self) -> List[str]:
|
||||||
flow_data = self.list_flows()
|
flow_datas = self.list_flows()
|
||||||
return [flow_data.data["name"] for flow_data in flow_data]
|
return [flow_data.data["name"] for flow_data in flow_datas]
|
||||||
|
|
||||||
def get_flow(self, flow_name: str) -> Optional[Data]:
|
def get_flow(self, flow_name: str) -> Optional[Data]:
|
||||||
"""
|
"""
|
||||||
|
|
@ -30,8 +30,8 @@ class FlowToolComponent(CustomComponent):
|
||||||
Returns:
|
Returns:
|
||||||
Optional[Text]: The flow record if found, None otherwise.
|
Optional[Text]: The flow record if found, None otherwise.
|
||||||
"""
|
"""
|
||||||
flow_data = self.list_flows()
|
flow_datas = self.list_flows()
|
||||||
for flow_data in flow_data:
|
for flow_data in flow_datas:
|
||||||
if flow_data.data["name"] == flow_name:
|
if flow_data.data["name"] == flow_name:
|
||||||
return flow_data
|
return flow_data
|
||||||
return None
|
return None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue