style: Ran the linter

This commit is contained in:
Paul Gauthier (aider) 2024-08-26 15:40:08 -07:00
parent 0b2d0004b6
commit a17b9601c5

View file

@ -1008,14 +1008,13 @@ class Coder:
self.io.tool_error(f"Cache warming error: {str(err)}") self.io.tool_error(f"Cache warming error: {str(err)}")
continue continue
cache_hit_tokens = getattr(completion.usage, "prompt_cache_hit_tokens", 0) or getattr( cache_hit_tokens = getattr(
completion.usage, "cache_read_input_tokens", 0 completion.usage, "prompt_cache_hit_tokens", 0
) ) or getattr(completion.usage, "cache_read_input_tokens", 0)
self.io.tool_output(f"Warmed {cache_hit_tokens} cached tokens.") self.io.tool_output(f"Warmed {cache_hit_tokens} cached tokens.")
self.io.tool_output("Stopped warming.") self.io.tool_output("Stopped warming.")
self.cache_warming_thread = threading.Timer(0, warm_cache_worker) self.cache_warming_thread = threading.Timer(0, warm_cache_worker)
self.cache_warming_thread.start() self.cache_warming_thread.start()