fix: change typing for linting and formatting
This commit is contained in:
parent
e049438cc5
commit
064cf8120f
5 changed files with 9 additions and 15 deletions
|
|
@ -1,5 +1,3 @@
|
||||||
from copy import deepcopy
|
|
||||||
import types
|
|
||||||
from typing import Dict, List, Union
|
from typing import Dict, List, Union
|
||||||
from langflow.utils import payload
|
from langflow.utils import payload
|
||||||
from langflow.interface.listing import ALL_TOOLS_NAMES
|
from langflow.interface.listing import ALL_TOOLS_NAMES
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
import types
|
|
||||||
from typing import Any, Dict, List, Optional, Union
|
from typing import Any, Dict, List, Optional, Union
|
||||||
|
|
||||||
from langflow.interface.listing import ALL_TYPES_DICT, TOOLS_DICT
|
|
||||||
from langflow.interface import loading
|
|
||||||
from langflow.graph.base import Node
|
from langflow.graph.base import Node
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ from langflow.interface.custom_lists import (
|
||||||
llm_type_to_cls_dict,
|
llm_type_to_cls_dict,
|
||||||
memory_type_to_cls_dict,
|
memory_type_to_cls_dict,
|
||||||
toolkit_type_to_cls_dict,
|
toolkit_type_to_cls_dict,
|
||||||
toolkit_type_to_loader_dict,
|
|
||||||
wrapper_type_to_cls_dict,
|
wrapper_type_to_cls_dict,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
import os
|
import os
|
||||||
from typing import List, Optional
|
from typing import List
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
from pydantic import BaseSettings, Field, root_validator
|
from pydantic import BaseSettings, Field, root_validator
|
||||||
|
|
||||||
|
|
||||||
class Settings(BaseSettings):
|
class Settings(BaseSettings):
|
||||||
chains: Optional[List[str]] = Field(...)
|
chains: List[str] = Field(default=[])
|
||||||
agents: Optional[List[str]] = Field(...)
|
agents: List[str] = Field(default=[])
|
||||||
prompts: Optional[List[str]] = Field(...)
|
prompts: List[str] = Field(default=[])
|
||||||
llms: Optional[List[str]] = Field(...)
|
llms: List[str] = Field(default=[])
|
||||||
tools: Optional[List[str]] = Field(...)
|
tools: List[str] = Field(default=[])
|
||||||
memories: Optional[List[str]] = Field(...)
|
memories: List[str] = Field(default=[])
|
||||||
dev: bool = Field(...)
|
dev: bool = Field(default=False)
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
validate_assignment = True
|
validate_assignment = True
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ def build_template_from_parameters(
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"template": format_dict(variables, name),
|
"template": format_dict(variables, name),
|
||||||
"description": docs["Description"],
|
"description": docs["Description"], # type: ignore
|
||||||
"base_classes": base_classes,
|
"base_classes": base_classes,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue