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

Commit

Permalink
Ensure that get_datastores().main is typed
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Quah <seanq@element.io>
  • Loading branch information
Sean Quah committed Feb 23, 2022
1 parent 9fdbad0 commit 0f25916
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/12070.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove legacy `HomeServer.get_datastore()`.
3 changes: 2 additions & 1 deletion synapse/storage/databases/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

if TYPE_CHECKING:
from synapse.server import HomeServer
from synapse.storage.databases.main import DataStore

logger = logging.getLogger(__name__)

Expand All @@ -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]

Expand Down

0 comments on commit 0f25916

Please sign in to comment.