diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2021-12-13 17:05:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-13 17:05:00 +0000 |
commit | 5305a5e88144828419249fd9e4c5198d92276a44 (patch) | |
tree | 6c03eceaef4ae259d52510d64d1b9e90018483d1 /synapse/storage/_base.py | |
parent | Add type hints to `synapse/storage/databases/main/end_to_end_keys.py` (#11551) (diff) | |
download | synapse-5305a5e88144828419249fd9e4c5198d92276a44.tar.xz |
Type hint the constructors of the data store classes (#11555)
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r-- | synapse/storage/_base.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 3056e64ff5..7967011afd 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -17,10 +17,8 @@ import logging from abc import ABCMeta from typing import TYPE_CHECKING, Any, Collection, Iterable, Optional, Union -from synapse.storage.database import LoggingTransaction # noqa: F401 -from synapse.storage.database import make_in_list_sql_clause # noqa: F401 -from synapse.storage.database import DatabasePool -from synapse.storage.types import Connection +from synapse.storage.database import make_in_list_sql_clause # noqa: F401; noqa: F401 +from synapse.storage.database import DatabasePool, LoggingDatabaseConnection from synapse.types import get_domain_from_id from synapse.util import json_decoder @@ -38,7 +36,12 @@ class SQLBaseStore(metaclass=ABCMeta): per data store (and not one per physical database). """ - def __init__(self, database: DatabasePool, db_conn: Connection, hs: "HomeServer"): + def __init__( + self, + database: DatabasePool, + db_conn: LoggingDatabaseConnection, + hs: "HomeServer", + ): self.hs = hs self._clock = hs.get_clock() self.database_engine = database.engine |