fix: Make mypy happy

pull/923/head
Raphaël Vinot 2024-06-24 17:01:17 +02:00
parent 990be698a0
commit 79f3916454
1 changed files with 2 additions and 2 deletions

View File

@ -271,7 +271,7 @@ class CapturesIndex(Mapping): # type: ignore[type-arg]
return None
p = self.redis.pipeline()
has_new_cached_captures = False
recent_captures = {}
recent_captures: dict[str, float] = {}
for uuid, directory in self.redis.hscan_iter('lookup_dirs'):
if uuid in self.__cache:
continue
@ -291,7 +291,7 @@ class CapturesIndex(Mapping): # type: ignore[type-arg]
if hasattr(cc, 'timestamp'):
recent_captures[cc.uuid] = cc.timestamp.timestamp()
if recent_captures:
self.redis.zadd('recent_captures', recent_captures, nx=True)
self.redis.zadd('recent_captures', mapping=recent_captures, nx=True) # type: ignore[arg-type]
def _get_capture_dir(self, uuid: str) -> str:
# Try to get from the recent captures cache in redis