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/ratelimiting.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'synapse/config/ratelimiting.py') diff --git a/synapse/config/ratelimiting.py b/synapse/config/ratelimiting.py index e9ccf1bd62..0587f5c10f 100644 --- a/synapse/config/ratelimiting.py +++ b/synapse/config/ratelimiting.py @@ -12,10 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Dict, Optional +from typing import Any, Dict, Optional import attr +from synapse.types import JsonDict + from ._base import Config @@ -43,7 +45,7 @@ class FederationRateLimitConfig: class RatelimitConfig(Config): section = "ratelimiting" - def read_config(self, config, **kwargs): + def read_config(self, config: JsonDict, **kwargs: Any) -> None: # Load the new-style messages config if it exists. Otherwise fall back # to the old method. @@ -142,7 +144,7 @@ class RatelimitConfig(Config): }, ) - def generate_config_section(self, **kwargs): + def generate_config_section(self, **kwargs: Any) -> str: return """\ ## Ratelimiting ## -- cgit 1.4.1