Ensure that get_datastores().main is typed (#12070)

Signed-off-by: Sean Quah <seanq@element.io>
This commit is contained in:
Sean Quah 2022-02-25 10:20:40 +00:00 committed by GitHub
parent f3fd8558cd
commit b43c3ef8e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

1
changelog.d/12070.misc Normal file
View file

@ -0,0 +1 @@
Remove legacy `HomeServer.get_datastore()`.

View file

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