Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Get the cache storage passing mypy #11354

Closed
wants to merge 17 commits into from
1 change: 0 additions & 1 deletion synapse/app/generic_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ class GenericWorkerSlavedStore(
# FIXME(#3714): We need to add UserDirectoryStore as we write directly
# rather than going via the correct worker.
UserDirectoryStore,
StatsStore,
UIAuthWorkerStore,
EndToEndRoomKeyStore,
PresenceStore,
Expand Down
1 change: 0 additions & 1 deletion synapse/storage/databases/main/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class DataStore(
GroupServerStore,
UserErasureStore,
MonthlyActiveUsersStore,
StatsStore,
RelationsStore,
CensorEventsStore,
UIAuthStore,
Expand Down
2 changes: 2 additions & 0 deletions synapse/storage/databases/main/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
EventPushActionsWorkerStore,
)
from synapse.storage.databases.main.relations import RelationsWorkerStore
from synapse.storage.databases.main.stats import StatsStore
from synapse.storage.databases.main.stream import StreamWorkerStore
from synapse.storage.engines import PostgresEngine
from synapse.storage.util.id_generators import MultiWriterIdGenerator
Expand All @@ -59,6 +60,7 @@ class CacheInvalidationWorkerStore(
RelationsWorkerStore,
EventPushActionsWorkerStore,
StreamWorkerStore,
StatsStore,
clokep marked this conversation as resolved.
Show resolved Hide resolved
):
# This class must be mixed in with a child class which provides the following
# attribute. TODO: can we get static analysis to enforce this?
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@ async def is_guest(self, user_id: str) -> bool:
return res if res else False


class RegistrationStore(StatsStore, RegistrationBackgroundUpdateStore):
class RegistrationStore(RegistrationBackgroundUpdateStore, StatsStore):
def __init__(
self,
database: DatabasePool,
Expand Down