From 98a09174d9436b9658894322c08bc190c1831e84 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Thu, 30 May 2024 22:52:53 -0300 Subject: [PATCH] refactor: Add __bool__ method to CacheMiss class This commit adds the __bool__ method to the CacheMiss class in the utils.py file. The __bool__ method returns False, allowing the CacheMiss object to be treated as False in boolean expressions. This change improves the functionality and usability of the CacheMiss class. --- src/backend/base/langflow/services/cache/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/base/langflow/services/cache/utils.py b/src/backend/base/langflow/services/cache/utils.py index ff19836ef..a89963f56 100644 --- a/src/backend/base/langflow/services/cache/utils.py +++ b/src/backend/base/langflow/services/cache/utils.py @@ -23,6 +23,9 @@ class CacheMiss: def __repr__(self): return "" + def __bool__(self): + return False + def create_cache_folder(func): def wrapper(*args, **kwargs):