From 0f259162ccc4f5bba4647fb1213fdd72e2ecf830 Mon Sep 17 00:00:00 2001 From: Sean Quah Date: Wed, 23 Feb 2022 13:56:32 +0000 Subject: [PATCH] Ensure that `get_datastores().main` is typed Signed-off-by: Sean Quah --- changelog.d/12070.misc | 1 + synapse/storage/databases/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/12070.misc diff --git a/changelog.d/12070.misc b/changelog.d/12070.misc new file mode 100644 index 000000000000..d4bedc6b97cb --- /dev/null +++ b/changelog.d/12070.misc @@ -0,0 +1 @@ +Remove legacy `HomeServer.get_datastore()`. diff --git a/synapse/storage/databases/__init__.py b/synapse/storage/databases/__init__.py index cfe887b7f73d..ce3d1d4e942e 100644 --- a/synapse/storage/databases/__init__.py +++ b/synapse/storage/databases/__init__.py @@ -24,6 +24,7 @@ if TYPE_CHECKING: from synapse.server import HomeServer + from synapse.storage.databases.main import DataStore logger = logging.getLogger(__name__) @@ -44,7 +45,7 @@ class Databases(Generic[DataStoreT]): """ databases: List[DatabasePool] - main: DataStoreT + main: "DataStore" # FIXME: #11165: actually an instance of `main_store_class` state: StateGroupDataStore persist_events: Optional[PersistEventsStore]