summary refs log tree commit diff
path: root/synapse/storage/database.py
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2021-10-22 18:15:41 +0100
committerGitHub <noreply@github.com>2021-10-22 18:15:41 +0100
commit2b82ec425fccb0ef626242779f7ccd4d77a0685c (patch)
treed541487cf7936d98807c5b1ef5128bb1bb5c783c /synapse/storage/database.py
parentFix synapse.config module "read" command (#11145) (diff)
downloadsynapse-2b82ec425fccb0ef626242779f7ccd4d77a0685c.tar.xz
Add type hints for most `HomeServer` parameters (#11095)
Diffstat (limited to 'synapse/storage/database.py')
-rw-r--r--synapse/storage/database.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py
index f5a8f90a0f..fa4e89d35c 100644
--- a/synapse/storage/database.py
+++ b/synapse/storage/database.py
@@ -19,6 +19,7 @@ from collections import defaultdict
 from sys import intern
 from time import monotonic as monotonic_time
 from typing import (
+    TYPE_CHECKING,
     Any,
     Callable,
     Collection,
@@ -52,6 +53,9 @@ from synapse.storage.background_updates import BackgroundUpdater
 from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine, Sqlite3Engine
 from synapse.storage.types import Connection, Cursor
 
+if TYPE_CHECKING:
+    from synapse.server import HomeServer
+
 # python 3 does not have a maximum int value
 MAX_TXN_ID = 2 ** 63 - 1
 
@@ -392,7 +396,7 @@ class DatabasePool:
 
     def __init__(
         self,
-        hs,
+        hs: "HomeServer",
         database_config: DatabaseConnectionConfig,
         engine: BaseDatabaseEngine,
     ):