From d2966c37df51b707b16f2859c65bc5a14e05067e Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 30 Nov 2023 17:08:50 -0300 Subject: [PATCH] Refactor code_parser.py to remove kwargs from showing up as fields in the frontend --- src/backend/langflow/interface/custom/code_parser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/backend/langflow/interface/custom/code_parser.py b/src/backend/langflow/interface/custom/code_parser.py index 696e5e50d..dbb56773e 100644 --- a/src/backend/langflow/interface/custom/code_parser.py +++ b/src/backend/langflow/interface/custom/code_parser.py @@ -6,8 +6,8 @@ from typing import Any, Dict, List, Type, Union from cachetools import TTLCache, cachedmethod, keys from fastapi import HTTPException - -from langflow.interface.custom.schema import CallableCodeDetails, ClassCodeDetails +from langflow.interface.custom.schema import (CallableCodeDetails, + ClassCodeDetails) class CodeSyntaxError(HTTPException): @@ -168,7 +168,9 @@ class CodeParser: args += self.parse_positional_args(node) args += self.parse_varargs(node) args += self.parse_keyword_args(node) - args += self.parse_kwargs(node) + # Commented out because we don't want kwargs + # showing up as fields in the frontend + # args += self.parse_kwargs(node) return args