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.
This commit is contained in:
parent
230c4a69ed
commit
98a09174d9
1 changed files with 3 additions and 0 deletions
|
|
@ -23,6 +23,9 @@ class CacheMiss:
|
|||
def __repr__(self):
|
||||
return "<CACHE_MISS>"
|
||||
|
||||
def __bool__(self):
|
||||
return False
|
||||
|
||||
|
||||
def create_cache_folder(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue