run lint and fix errors, except mypy

This commit is contained in:
pacrob
2024-02-19 15:56:20 -07:00
parent 42605c0288
commit 94483714a3
171 changed files with 4809 additions and 2290 deletions

View File

@ -1,10 +1,17 @@
from typing import Dict, List, Optional, Sequence, Tuple
from typing import (
Dict,
List,
Optional,
Sequence,
Tuple,
)
from .pb import rpc_pb2
from .pb import (
rpc_pb2,
)
class CacheEntry:
mid: Tuple[bytes, bytes]
topics: List[str]
@ -24,7 +31,6 @@ class CacheEntry:
class MessageCache:
window_size: int
history_size: int
@ -91,8 +97,9 @@ class MessageCache:
return mids
def shift(self) -> None:
"""Shift the window over by 1 position, dropping the last element of
the history."""
"""
Shift the window over by 1 position, dropping the last element of the history.
"""
last_entries: List[CacheEntry] = self.history[len(self.history) - 1]
for entry in last_entries: