@@ -100,8 +100,8 @@ async def get(self: KeyValueStoreClient) -> dict | None:
100100 found = self ._find_or_create_client_by_id_or_name (memory_storage_client = self ._memory_storage_client , id = self ._id , name = self ._name )
101101
102102 if found :
103- async with found ._file_operation_lock : # type: ignore
104- await found ._update_timestamps (has_been_modified = False ) # type: ignore
103+ async with found ._file_operation_lock :
104+ await found ._update_timestamps (has_been_modified = False )
105105 return found ._to_resource_info ()
106106
107107 return None
@@ -127,7 +127,7 @@ async def update(self: KeyValueStoreClient, *, name: str | None = None) -> dict:
127127 if name is None :
128128 return existing_store_by_id ._to_resource_info ()
129129
130- async with existing_store_by_id ._file_operation_lock : # type: ignore
130+ async with existing_store_by_id ._file_operation_lock :
131131 # Check that name is not in use already
132132 existing_store_by_name = next (
133133 (store for store in self ._memory_storage_client ._key_value_stores_handled if store ._name and store ._name .lower () == name .lower ()),
@@ -146,7 +146,7 @@ async def update(self: KeyValueStoreClient, *, name: str | None = None) -> dict:
146146 await force_rename (previous_dir , existing_store_by_id ._resource_directory )
147147
148148 # Update timestamps
149- await existing_store_by_id ._update_timestamps (has_been_modified = True ) # type: ignore
149+ await existing_store_by_id ._update_timestamps (has_been_modified = True )
150150
151151 return existing_store_by_id ._to_resource_info ()
152152
@@ -187,7 +187,7 @@ async def list_keys(
187187
188188 items = []
189189
190- for record in existing_store_by_id ._records .values (): # type: ignore
190+ for record in existing_store_by_id ._records .values ():
191191 size = len (record ['value' ])
192192 items .append (
193193 {
@@ -222,8 +222,8 @@ async def list_keys(
222222 is_last_selected_item_absolutely_last = last_item_in_store == last_selected_item
223223 next_exclusive_start_key = None if is_last_selected_item_absolutely_last else last_selected_item ['key' ]
224224
225- async with existing_store_by_id ._file_operation_lock : # type: ignore
226- await existing_store_by_id ._update_timestamps (has_been_modified = False ) # type: ignore
225+ async with existing_store_by_id ._file_operation_lock :
226+ await existing_store_by_id ._update_timestamps (has_been_modified = False )
227227
228228 return {
229229 'count' : len (items ),
@@ -247,7 +247,7 @@ async def _get_record_internal(
247247 if existing_store_by_id is None :
248248 raise_on_non_existing_storage (StorageTypes .KEY_VALUE_STORE , self ._id )
249249
250- stored_record = existing_store_by_id ._records .get (key ) # type: ignore
250+ stored_record = existing_store_by_id ._records .get (key )
251251
252252 if stored_record is None :
253253 return None
@@ -264,8 +264,8 @@ async def _get_record_internal(
264264 except ValueError :
265265 logger .exception ('Error parsing key-value store record' )
266266
267- async with existing_store_by_id ._file_operation_lock : # type: ignore
268- await existing_store_by_id ._update_timestamps (has_been_modified = False ) # type: ignore
267+ async with existing_store_by_id ._file_operation_lock :
268+ await existing_store_by_id ._update_timestamps (has_been_modified = False )
269269
270270 return record
271271
@@ -324,22 +324,22 @@ async def set_record(self: KeyValueStoreClient, key: str, value: Any, content_ty
324324 if 'application/json' in content_type and not is_file_or_bytes (value ) and not isinstance (value , str ):
325325 value = json_dumps (value ).encode ('utf-8' )
326326
327- async with existing_store_by_id ._file_operation_lock : # type: ignore
328- await existing_store_by_id ._update_timestamps (has_been_modified = True ) # type: ignore
327+ async with existing_store_by_id ._file_operation_lock :
328+ await existing_store_by_id ._update_timestamps (has_been_modified = True )
329329 record : KeyValueStoreRecord = {
330330 'key' : key ,
331331 'value' : value ,
332332 'contentType' : content_type ,
333333 }
334334
335- old_record = existing_store_by_id ._records .get (key ) # type: ignore
336- existing_store_by_id ._records [key ] = record # type: ignore
335+ old_record = existing_store_by_id ._records .get (key )
336+ existing_store_by_id ._records [key ] = record
337337
338338 if self ._memory_storage_client ._persist_storage :
339339 if old_record is not None and _filename_from_record (old_record ) != _filename_from_record (record ):
340- await existing_store_by_id ._delete_persisted_record (old_record ) # type: ignore
340+ await existing_store_by_id ._delete_persisted_record (old_record )
341341
342- await existing_store_by_id ._persist_record (record ) # type: ignore
342+ await existing_store_by_id ._persist_record (record )
343343
344344 async def _persist_record (self : KeyValueStoreClient , record : KeyValueStoreRecord ) -> None :
345345 store_directory = self ._resource_directory
@@ -385,14 +385,14 @@ async def delete_record(self: KeyValueStoreClient, key: str) -> None:
385385 if existing_store_by_id is None :
386386 raise_on_non_existing_storage (StorageTypes .KEY_VALUE_STORE , self ._id )
387387
388- record = existing_store_by_id ._records .get (key ) # type: ignore
388+ record = existing_store_by_id ._records .get (key )
389389
390390 if record is not None :
391- async with existing_store_by_id ._file_operation_lock : # type: ignore
392- del existing_store_by_id ._records [key ] # type: ignore
393- await existing_store_by_id ._update_timestamps (has_been_modified = True ) # type: ignore
391+ async with existing_store_by_id ._file_operation_lock :
392+ del existing_store_by_id ._records [key ]
393+ await existing_store_by_id ._update_timestamps (has_been_modified = True )
394394 if self ._memory_storage_client ._persist_storage :
395- await existing_store_by_id ._delete_persisted_record (record ) # type: ignore
395+ await existing_store_by_id ._delete_persisted_record (record )
396396
397397 async def _delete_persisted_record (self : KeyValueStoreClient , record : KeyValueStoreRecord ) -> None :
398398 store_directory = self ._resource_directory
@@ -437,7 +437,7 @@ def _get_storages_dir(cls: type[KeyValueStoreClient], memory_storage_client: Mem
437437 return memory_storage_client ._key_value_stores_directory
438438
439439 @classmethod
440- def _get_storage_client_cache ( # type: ignore
440+ def _get_storage_client_cache (
441441 cls : type [KeyValueStoreClient ],
442442 memory_storage_client : MemoryStorageClient ,
443443 ) -> list [KeyValueStoreClient ]:
0 commit comments