summary refs log tree commit diff
path: root/synapse/config/repository.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-04-11 12:07:23 -0400
committerGitHub <noreply@github.com>2022-04-11 12:07:23 -0400
commit4586119f0b0901be64f08655d3aaaef289a51bde (patch)
tree8150ea6084a6a7a034d272654720333d01b75b9f /synapse/config/repository.py
parentEnable certificate checking during complement tests (#12435) (diff)
downloadsynapse-4586119f0b0901be64f08655d3aaaef289a51bde.tar.xz
Add missing type hints to config classes. (#12402)
Diffstat (limited to 'synapse/config/repository.py')
-rw-r--r--synapse/config/repository.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py
index 0a0d901bfb..98d8a16621 100644
--- a/synapse/config/repository.py
+++ b/synapse/config/repository.py
@@ -14,7 +14,7 @@
 
 import logging
 import os
-from typing import Dict, List, Tuple
+from typing import Any, Dict, List, Tuple
 from urllib.request import getproxies_environment  # type: ignore
 
 import attr
@@ -94,7 +94,7 @@ def parse_thumbnail_requirements(
 class ContentRepositoryConfig(Config):
     section = "media"
 
-    def read_config(self, config, **kwargs):
+    def read_config(self, config: JsonDict, **kwargs: Any) -> None:
 
         # Only enable the media repo if either the media repo is enabled or the
         # current worker app is the media repo.
@@ -223,7 +223,8 @@ class ContentRepositoryConfig(Config):
                 "url_preview_accept_language"
             ) or ["en"]
 
-    def generate_config_section(self, data_dir_path, **kwargs):
+    def generate_config_section(self, data_dir_path: str, **kwargs: Any) -> str:
+        assert data_dir_path is not None
         media_store = os.path.join(data_dir_path, "media_store")
 
         formatted_thumbnail_sizes = "".join(