refac: fix linting
This commit is contained in:
parent
e6ce86b66a
commit
17ad4954ef
11 changed files with 131 additions and 140 deletions
|
|
@ -1,12 +1,10 @@
|
|||
import hashlib
|
||||
import json
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
import dill
|
||||
import pytest
|
||||
from langflow.cache.utils import PREFIX, compute_hash, load_cache, save_cache
|
||||
from langflow.interface.run import load_langchain_object, process_graph
|
||||
from langflow.cache.utils import PREFIX, compute_hash
|
||||
from langflow.interface.run import load_langchain_object
|
||||
|
||||
|
||||
def get_graph(_type="basic"):
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ def sample_lang_chain_type_creator() -> LangChainTypeCreator:
|
|||
class SampleLangChainTypeCreator(LangChainTypeCreator):
|
||||
type_name: str = "test_type"
|
||||
|
||||
def type_to_loader_dict(self) -> Dict:
|
||||
def type_to_loader_dict(self) -> Dict: # type: ignore
|
||||
return {"test_type": "TestClass"}
|
||||
|
||||
def to_list(self) -> List[str]:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
from typing import Dict, List
|
||||
|
||||
import pytest
|
||||
from langflow.interface.agents.base import AgentCreator
|
||||
from langflow.interface.base import LangChainTypeCreator
|
||||
from langflow.template.base import FrontendNode, Template, TemplateField
|
||||
|
||||
|
||||
|
|
@ -28,16 +24,16 @@ def sample_frontend_node(sample_template: Template) -> FrontendNode:
|
|||
|
||||
def test_template_field_defaults(sample_template_field: TemplateField):
|
||||
assert sample_template_field.field_type == "str"
|
||||
assert sample_template_field.required == False
|
||||
assert sample_template_field.required is False
|
||||
assert sample_template_field.placeholder == ""
|
||||
assert sample_template_field.is_list == False
|
||||
assert sample_template_field.show == True
|
||||
assert sample_template_field.multiline == False
|
||||
assert sample_template_field.value == None
|
||||
assert sample_template_field.is_list is False
|
||||
assert sample_template_field.show is True
|
||||
assert sample_template_field.multiline is False
|
||||
assert sample_template_field.value is None
|
||||
assert sample_template_field.suffixes == []
|
||||
assert sample_template_field.file_types == []
|
||||
assert sample_template_field.content == None
|
||||
assert sample_template_field.password == False
|
||||
assert sample_template_field.content is None
|
||||
assert sample_template_field.password is False
|
||||
assert sample_template_field.name == "test_field"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import importlib
|
||||
import re
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
import pytest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue