summary refs log tree commit diff
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2022-02-25 10:20:40 +0000
committerGitHub <noreply@github.com>2022-02-25 10:20:40 +0000
commitb43c3ef8e2306829074d847bed50575d5e7c7ea3 (patch)
treecbf3481f4859e44b48ac9becbf7b60e220c1eb22
parentMinor typing fixes for `synapse/storage/persist_events.py` (#12069) (diff)
downloadsynapse-b43c3ef8e2306829074d847bed50575d5e7c7ea3.tar.xz
Ensure that `get_datastores().main` is typed (#12070)
Signed-off-by: Sean Quah <seanq@element.io>
-rw-r--r--changelog.d/12070.misc1
-rw-r--r--synapse/storage/databases/__init__.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/changelog.d/12070.misc b/changelog.d/12070.misc
new file mode 100644
index 0000000000..d4bedc6b97
--- /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 cfe887b7f7..ce3d1d4e94 100644
--- a/synapse/storage/databases/__init__.py
+++ b/synapse/storage/databases/__init__.py
@@ -24,6 +24,7 @@ from synapse.storage.prepare_database import prepare_database
 
 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]