feat: mypy for all type check (#10921)
This commit is contained in:
parent
c91e8b1737
commit
56e15d09a9
584 changed files with 3975 additions and 2826 deletions
|
|
@ -125,7 +125,7 @@ class CodeNode(BaseNode[CodeNodeData]):
|
|||
if depth > dify_config.CODE_MAX_DEPTH:
|
||||
raise DepthLimitError(f"Depth limit ${dify_config.CODE_MAX_DEPTH} reached, object too deep.")
|
||||
|
||||
transformed_result = {}
|
||||
transformed_result: dict[str, Any] = {}
|
||||
if output_schema is None:
|
||||
# validate output thought instance type
|
||||
for output_name, output_value in result.items():
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class CodeNodeData(BaseNodeData):
|
|||
|
||||
class Output(BaseModel):
|
||||
type: Literal["string", "number", "object", "array[string]", "array[number]", "array[object]"]
|
||||
children: Optional[dict[str, "Output"]] = None
|
||||
children: Optional[dict[str, "CodeNodeData.Output"]] = None
|
||||
|
||||
class Dependency(BaseModel):
|
||||
name: str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue