1010from models .cache_entry import CacheEntry
1111from models .config import SQLiteDatabaseConfiguration
1212from models .responses import ConversationData , ReferencedDocument
13+ from utils .connection_decorator import connection
1314from utils .types import ToolCallSummary , ToolResultSummary
1415from log import get_logger
15- from utils .connection_decorator import connection
1616
1717logger = get_logger ("cache.sqlite_cache" )
1818
@@ -194,7 +194,7 @@ def initialize_cache(self) -> None:
194194 self .connection .commit ()
195195
196196 @connection
197- def get (
197+ def get ( # pylint: disable=R0914
198198 self , user_id : str , conversation_id : str , skip_user_id_check : bool = False
199199 ) -> list [CacheEntry ]:
200200 """Get the value associated with the given key.
@@ -247,7 +247,8 @@ def get(
247247 ]
248248 except (json .JSONDecodeError , ValueError ) as e :
249249 logger .warning (
250- "Failed to deserialize tool_calls for " "conversation %s: %s" ,
250+ "Failed to deserialize tool_calls for "
251+ "conversation %s: %s" ,
251252 conversation_id ,
252253 e ,
253254 )
@@ -263,7 +264,8 @@ def get(
263264 ]
264265 except (json .JSONDecodeError , ValueError ) as e :
265266 logger .warning (
266- "Failed to deserialize tool_results for " "conversation %s: %s" ,
267+ "Failed to deserialize tool_results for "
268+ "conversation %s: %s" ,
267269 conversation_id ,
268270 e ,
269271 )
@@ -332,7 +334,8 @@ def insert_or_append(
332334 tool_calls_json = json .dumps (tool_calls_as_dicts )
333335 except (TypeError , ValueError ) as e :
334336 logger .warning (
335- "Failed to serialize tool_calls for " "conversation %s: %s" ,
337+ "Failed to serialize tool_calls for "
338+ "conversation %s: %s" ,
336339 conversation_id ,
337340 e ,
338341 )
@@ -346,7 +349,8 @@ def insert_or_append(
346349 tool_results_json = json .dumps (tool_results_as_dicts )
347350 except (TypeError , ValueError ) as e :
348351 logger .warning (
349- "Failed to serialize tool_results for " "conversation %s: %s" ,
352+ "Failed to serialize tool_results for "
353+ "conversation %s: %s" ,
350354 conversation_id ,
351355 e ,
352356 )
0 commit comments