fix: change typing for linting and formatting

This commit is contained in:
Gabriel Almeida 2023-03-30 16:34:52 -03:00
commit 064cf8120f
5 changed files with 9 additions and 15 deletions

View file

@ -1,5 +1,3 @@
from copy import deepcopy
import types
from typing import Dict, List, Union
from langflow.utils import payload
from langflow.interface.listing import ALL_TOOLS_NAMES

View file

@ -1,9 +1,6 @@
from copy import deepcopy
import types
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

View file

@ -13,7 +13,6 @@ from langflow.interface.custom_lists import (
llm_type_to_cls_dict,
memory_type_to_cls_dict,
toolkit_type_to_cls_dict,
toolkit_type_to_loader_dict,
wrapper_type_to_cls_dict,
)

View file

@ -1,18 +1,18 @@
import os
from typing import List, Optional
from typing import List
import yaml
from pydantic import BaseSettings, Field, root_validator
class Settings(BaseSettings):
chains: Optional[List[str]] = Field(...)
agents: Optional[List[str]] = Field(...)
prompts: Optional[List[str]] = Field(...)
llms: Optional[List[str]] = Field(...)
tools: Optional[List[str]] = Field(...)
memories: Optional[List[str]] = Field(...)
dev: bool = Field(...)
chains: List[str] = Field(default=[])
agents: List[str] = Field(default=[])
prompts: List[str] = Field(default=[])
llms: List[str] = Field(default=[])
tools: List[str] = Field(default=[])
memories: List[str] = Field(default=[])
dev: bool = Field(default=False)
class Config:
validate_assignment = True

View file

@ -55,7 +55,7 @@ def build_template_from_parameters(
return {
"template": format_dict(variables, name),
"description": docs["Description"],
"description": docs["Description"], # type: ignore
"base_classes": base_classes,
}