diff --git a/src/backend/langflow/interface/custom/custom_component.py b/src/backend/langflow/interface/custom/custom_component.py index c439b0d2a..70036a0b2 100644 --- a/src/backend/langflow/interface/custom/custom_component.py +++ b/src/backend/langflow/interface/custom/custom_component.py @@ -27,7 +27,8 @@ class CustomComponent(Component): }, ) - # TODO: Create the logic to validate what the Custom Component should have as a prerequisite to be able to execute + # TODO: Create the logic to validate what the Custom Component + # should have as a prerequisite to be able to execute return True def is_check_valid(self) -> bool: diff --git a/src/frontend/src/modals/codeAreaModal/index.tsx b/src/frontend/src/modals/codeAreaModal/index.tsx index e6ef23b53..91e3f9cbd 100644 --- a/src/frontend/src/modals/codeAreaModal/index.tsx +++ b/src/frontend/src/modals/codeAreaModal/index.tsx @@ -3,8 +3,6 @@ import "ace-builds/src-noconflict/ext-language_tools"; import "ace-builds/src-noconflict/mode-python"; import "ace-builds/src-noconflict/theme-github"; import "ace-builds/src-noconflict/theme-twilight"; -import "ace-builds/src-noconflict/ext-language_tools"; -import "ace-builds/src-noconflict/ace"; // import "ace-builds/webpack-resolver"; import { TerminalSquare } from "lucide-react"; import { ReactNode, useContext, useEffect, useState } from "react"; @@ -15,12 +13,6 @@ import { alertContext } from "../../contexts/alertContext"; import { darkContext } from "../../contexts/darkContext"; import { postCustomComponent, postValidateCode } from "../../controllers/API"; import { APIClassType } from "../../types/api"; -import { - Tabs, - TabsContent, - TabsList, - TabsTrigger, -} from "../../components/ui/tabs"; import BaseModal from "../baseModal"; export default function CodeAreaModal({ @@ -48,7 +40,7 @@ export default function CodeAreaModal({ useEffect(() => { handleClick(); - }, []) + }, []); function handleClick() { if (!dynamic) { @@ -133,7 +125,7 @@ export default function CodeAreaModal({
-
+
group.family === parentOutput); result = resFil; } diff --git a/tests/test_custom_component.py b/tests/test_custom_component.py index bb7e00dcf..e60b392ea 100644 --- a/tests/test_custom_component.py +++ b/tests/test_custom_component.py @@ -94,7 +94,8 @@ def test_component_code_null_error(): def test_component_function_entrypoint_name_null_error(): """ - Test the get_function method raises the ComponentFunctionEntrypointNameNullError when the function_entrypoint_name is empty. + Test the get_function method raises the ComponentFunctionEntrypointNameNullError + when the function_entrypoint_name is empty. """ component = Component(code=code_default, function_entrypoint_name="") with pytest.raises(ComponentFunctionEntrypointNameNullError): @@ -364,7 +365,8 @@ def test_code_parser_parse_function_def_init(): def test_component_get_code_tree_syntax_error(): """ - Test the get_code_tree method of the Component class raises the CodeSyntaxError when given incorrect syntax. + Test the get_code_tree method of the Component class + raises the CodeSyntaxError when given incorrect syntax. """ component = Component(code="import os as", function_entrypoint_name="build") with pytest.raises(CodeSyntaxError): @@ -373,7 +375,8 @@ def test_component_get_code_tree_syntax_error(): def test_custom_component_class_template_validation_no_code(): """ - Test the _class_template_validation method of the CustomComponent class raises the HTTPException when the code is None. + Test the _class_template_validation method of the CustomComponent class + raises the HTTPException when the code is None. """ custom_component = CustomComponent(code=None, function_entrypoint_name="build") with pytest.raises(HTTPException): @@ -407,7 +410,8 @@ class MyMainClass(CustomComponent): def test_custom_component_get_function_entrypoint_return_type_no_return_type(): """ - Test the get_function_entrypoint_return_type property of the CustomComponent class with a build method with no return type. + Test the get_function_entrypoint_return_type property of the + CustomComponent class with a build method with no return type. """ my_code = """ class MyClass(CustomComponent):