fix(cooldown_cache.py): fix linting errors

This commit is contained in:
Krrish Dholakia 2024-08-27 07:40:28 -07:00
parent 5572ad7241
commit cd7dd2a511

View file

@ -89,7 +89,7 @@ class CooldownCache:
# Process the results # Process the results
for model_id, result in zip(model_ids, results): for model_id, result in zip(model_ids, results):
if result and isinstance(result, dict): if result and isinstance(result, dict):
cooldown_cache_value = CooldownCacheValue(**result) cooldown_cache_value = CooldownCacheValue(**result) # type: ignore
active_cooldowns.append((model_id, cooldown_cache_value)) active_cooldowns.append((model_id, cooldown_cache_value))
return active_cooldowns return active_cooldowns
@ -107,7 +107,7 @@ class CooldownCache:
# Process the results # Process the results
for model_id, result in zip(model_ids, results): for model_id, result in zip(model_ids, results):
if result and isinstance(result, dict): if result and isinstance(result, dict):
cooldown_cache_value = CooldownCacheValue(**result) cooldown_cache_value = CooldownCacheValue(**result) # type: ignore
active_cooldowns.append((model_id, cooldown_cache_value)) active_cooldowns.append((model_id, cooldown_cache_value))
return active_cooldowns return active_cooldowns
@ -125,7 +125,7 @@ class CooldownCache:
# Process the results # Process the results
for model_id, result in zip(model_ids, results): for model_id, result in zip(model_ids, results):
if result and isinstance(result, dict): if result and isinstance(result, dict):
cooldown_cache_value = CooldownCacheValue(**result) cooldown_cache_value = CooldownCacheValue(**result) # type: ignore
if cooldown_cache_value["cooldown_time"] < min_cooldown_time: if cooldown_cache_value["cooldown_time"] < min_cooldown_time:
min_cooldown_time = cooldown_cache_value["cooldown_time"] min_cooldown_time = cooldown_cache_value["cooldown_time"]