mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 08:57:28 +08:00
fix mypy
This commit is contained in:
parent
8cc6927fed
commit
ea38b4bcbe
@ -92,7 +92,9 @@ class LoopNode(Node):
|
|||||||
if self._node_data.loop_variables:
|
if self._node_data.loop_variables:
|
||||||
value_processor: dict[Literal["constant", "variable"], Callable[[LoopVariableData], Segment | None]] = {
|
value_processor: dict[Literal["constant", "variable"], Callable[[LoopVariableData], Segment | None]] = {
|
||||||
"constant": lambda var: self._get_segment_for_constant(var.var_type, var.value),
|
"constant": lambda var: self._get_segment_for_constant(var.var_type, var.value),
|
||||||
"variable": lambda var: self.graph_runtime_state.variable_pool.get(var.value) if isinstance(var.value, list) else None,
|
"variable": lambda var: self.graph_runtime_state.variable_pool.get(var.value)
|
||||||
|
if isinstance(var.value, list)
|
||||||
|
else None,
|
||||||
}
|
}
|
||||||
for loop_variable in self._node_data.loop_variables:
|
for loop_variable in self._node_data.loop_variables:
|
||||||
if loop_variable.value_type not in value_processor:
|
if loop_variable.value_type not in value_processor:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user