Add type hints for most HomeServer parameters (#11095)

This commit is contained in:
Sean Quah 2021-10-22 18:15:41 +01:00 committed by GitHub
parent b9ce53e878
commit 2b82ec425f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 342 additions and 143 deletions

View file

@ -18,6 +18,7 @@ import itertools
import logging
from collections import deque
from typing import (
TYPE_CHECKING,
Any,
Awaitable,
Callable,
@ -56,6 +57,9 @@ from synapse.types import (
from synapse.util.async_helpers import ObservableDeferred, yieldable_gather_results
from synapse.util.metrics import Measure
if TYPE_CHECKING:
from synapse.server import HomeServer
logger = logging.getLogger(__name__)
# The number of times we are recalculating the current state
@ -272,7 +276,7 @@ class EventsPersistenceStorage:
current state and forward extremity changes.
"""
def __init__(self, hs, stores: Databases):
def __init__(self, hs: "HomeServer", stores: Databases):
# We ultimately want to split out the state store from the main store,
# so we use separate variables here even though they point to the same
# store for now.