diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-12-30 08:09:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 08:09:53 -0500 |
commit | 637282bb5019ce1656001927eea1be46c4854815 (patch) | |
tree | 7e9a9ba64918de5e995241a02054174ced099d75 /synapse/storage/__init__.py | |
parent | Doc/move database setup instructions in install md (#8987) (diff) | |
download | synapse-637282bb5019ce1656001927eea1be46c4854815.tar.xz |
Add additional type hints to the storage module. (#8980)
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r-- | synapse/storage/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index bbff3c8d5b..c0d9d1240f 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -27,6 +27,7 @@ There are also schemas that get applied to every database, regardless of the data stores associated with them (e.g. the schema version tables), which are stored in `synapse.storage.schema`. """ +from typing import TYPE_CHECKING from synapse.storage.databases import Databases from synapse.storage.databases.main import DataStore @@ -34,14 +35,18 @@ from synapse.storage.persist_events import EventsPersistenceStorage from synapse.storage.purge_events import PurgeEventsStorage from synapse.storage.state import StateGroupStorage -__all__ = ["DataStores", "DataStore"] +if TYPE_CHECKING: + from synapse.app.homeserver import HomeServer + + +__all__ = ["Databases", "DataStore"] class Storage: """The high level interfaces for talking to various storage layers. """ - def __init__(self, hs, stores: Databases): + def __init__(self, hs: "HomeServer", stores: Databases): # We include the main data store here mainly so that we don't have to # rewrite all the existing code to split it into high vs low level # interfaces. |