mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:26:02 -04:00
Add type hints for most HomeServer
parameters (#11095)
This commit is contained in:
parent
b9ce53e878
commit
2b82ec425f
58 changed files with 342 additions and 143 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue