From 6459a27777deec92cda0028eb6319fd40c89a122 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sun, 25 Jun 2023 21:37:24 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(loading.py):=20use=20'is'=20?= =?UTF-8?q?instead=20of=20'=3D=3D'=20to=20compare=20object=20types=20The?= =?UTF-8?q?=20commit=20changes=20the=20comparison=20operator=20from=20'=3D?= =?UTF-8?q?=3D'=20to=20'is'=20to=20compare=20object=20types.=20This=20is?= =?UTF-8?q?=20because=20'is'=20compares=20the=20object=20identity=20while?= =?UTF-8?q?=20'=3D=3D'=20compares=20the=20object=20value.=20In=20this=20ca?= =?UTF-8?q?se,=20we=20want=20to=20compare=20the=20object=20identity,=20so?= =?UTF-8?q?=20'is'=20is=20the=20correct=20operator=20to=20use.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/initialize/loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/interface/initialize/loading.py b/src/backend/langflow/interface/initialize/loading.py index a928ea586..d362ab844 100644 --- a/src/backend/langflow/interface/initialize/loading.py +++ b/src/backend/langflow/interface/initialize/loading.py @@ -204,7 +204,7 @@ def instantiate_textsplitter( "Try changing the chunk_size of the Text Splitter." ) from exc - if type(class_object) == RecursiveCharacterTextSplitter: + if class_object is RecursiveCharacterTextSplitter: if "separator_type" in params and params["separator_type"] == "Text": text_splitter = class_object(**params) else: