From 4586119f0b0901be64f08655d3aaaef289a51bde Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Mon, 11 Apr 2022 12:07:23 -0400 Subject: Add missing type hints to config classes. (#12402) --- synapse/config/stats.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'synapse/config/stats.py') diff --git a/synapse/config/stats.py b/synapse/config/stats.py index 6f253e00c0..ed1f416e4f 100644 --- a/synapse/config/stats.py +++ b/synapse/config/stats.py @@ -13,6 +13,9 @@ # limitations under the License. import logging +from typing import Any + +from synapse.types import JsonDict from ._base import Config @@ -36,7 +39,7 @@ class StatsConfig(Config): section = "stats" - def read_config(self, config, **kwargs): + def read_config(self, config: JsonDict, **kwargs: Any) -> None: self.stats_enabled = True stats_config = config.get("stats", None) if stats_config: @@ -44,7 +47,7 @@ class StatsConfig(Config): if not self.stats_enabled: logger.warning(ROOM_STATS_DISABLED_WARN) - def generate_config_section(self, config_dir_path, server_name, **kwargs): + def generate_config_section(self, **kwargs: Any) -> str: return """ # Settings for local room and user statistics collection. See # https://matrix-org.github.io/synapse/latest/room_and_user_statistics.html. -- cgit 1.4.1