From 49da01345e57fa24b38ede67efe0e8aaccd7b991 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 23 Nov 2023 10:03:40 -0300 Subject: [PATCH] Fix variable type annotation in CodeParser class --- src/backend/langflow/interface/custom/code_parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/interface/custom/code_parser.py b/src/backend/langflow/interface/custom/code_parser.py index d1b33a4e2..fd6e80a88 100644 --- a/src/backend/langflow/interface/custom/code_parser.py +++ b/src/backend/langflow/interface/custom/code_parser.py @@ -4,6 +4,7 @@ import traceback from typing import Any, Dict, List, Type, Union from fastapi import HTTPException + from langflow.interface.custom.schema import CallableCodeDetails, ClassCodeDetails @@ -106,7 +107,7 @@ class CodeParser: Constructs an evaluation environment with the necessary imports for the return type, taking into account module aliases. """ - eval_env = {} + eval_env: dict = {} for import_entry in self.data["imports"]: if isinstance(import_entry, tuple): # from module import name module, name = import_entry