mirror of https://github.com/langgenius/dify.git
fix mypy (#25862)
This commit is contained in:
commit
e386f350d1
|
|
@ -1,3 +1,3 @@
|
|||
from .app_config import DifyConfig
|
||||
|
||||
dify_config = DifyConfig() # pyright: ignore[reportCallIssue]
|
||||
dify_config = DifyConfig() # type: ignore
|
||||
|
|
|
|||
|
|
@ -512,11 +512,11 @@ class WorkflowVariableTruncationConfig(BaseSettings):
|
|||
description="Maximum size for variable to trigger final truncation.",
|
||||
)
|
||||
WORKFLOW_VARIABLE_TRUNCATION_STRING_LENGTH: PositiveInt = Field(
|
||||
50000,
|
||||
100000,
|
||||
description="maximum length for string to trigger tuncation, measure in number of characters",
|
||||
)
|
||||
WORKFLOW_VARIABLE_TRUNCATION_ARRAY_LENGTH: PositiveInt = Field(
|
||||
100,
|
||||
1000,
|
||||
description="maximum length for array to trigger truncation.",
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class DatasourceManager:
|
|||
|
||||
if controller is None:
|
||||
raise DatasourceProviderNotFoundError(f"Datasource provider {provider_id} not found.")
|
||||
|
||||
|
||||
return controller
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -92,7 +92,9 @@ class LoopNode(Node):
|
|||
if self._node_data.loop_variables:
|
||||
value_processor: dict[Literal["constant", "variable"], Callable[[LoopVariableData], Segment | None]] = {
|
||||
"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:
|
||||
if loop_variable.value_type not in value_processor:
|
||||
|
|
|
|||
Loading…
Reference in New Issue