1 files changed, 5 insertions, 3 deletions
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 ##
|