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

Commit b43c3ef

Browse files
authored
Ensure that get_datastores().main is typed (#12070)
Signed-off-by: Sean Quah <[email protected]>
1 parent f3fd855 commit b43c3ef

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

changelog.d/12070.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove legacy `HomeServer.get_datastore()`.

synapse/storage/databases/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
if TYPE_CHECKING:
2626
from synapse.server import HomeServer
27+
from synapse.storage.databases.main import DataStore
2728

2829
logger = logging.getLogger(__name__)
2930

@@ -44,7 +45,7 @@ class Databases(Generic[DataStoreT]):
4445
"""
4546

4647
databases: List[DatabasePool]
47-
main: DataStoreT
48+
main: "DataStore" # FIXME: #11165: actually an instance of `main_store_class`
4849
state: StateGroupDataStore
4950
persist_events: Optional[PersistEventsStore]
5051

0 commit comments

Comments
 (0)