summary refs log tree commit diff
path: root/synapse/config/key.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/key.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/key.py')
-rw-r--r--synapse/config/key.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/synapse/config/key.py b/synapse/config/key.py
index f5377e7d9c..ada65f6dd6 100644
--- a/synapse/config/key.py
+++ b/synapse/config/key.py
@@ -99,11 +99,14 @@ class TrustedKeyServer:
 class KeyConfig(Config):
     section = "key"
 
-    def read_config(self, config, config_dir_path, **kwargs):
+    def read_config(
+        self, config: JsonDict, config_dir_path: str, **kwargs: Any
+    ) -> None:
         # the signing key can be specified inline or in a separate file
         if "signing_key" in config:
             self.signing_key = read_signing_keys([config["signing_key"]])
         else:
+            assert config_dir_path is not None
             signing_key_path = config.get("signing_key_path")
             if signing_key_path is None:
                 signing_key_path = os.path.join(
@@ -172,8 +175,12 @@ class KeyConfig(Config):
         self.form_secret = config.get("form_secret", None)
 
     def generate_config_section(
-        self, config_dir_path, server_name, generate_secrets=False, **kwargs
-    ):
+        self,
+        config_dir_path: str,
+        server_name: str,
+        generate_secrets: bool = False,
+        **kwargs: Any,
+    ) -> str:
         base_key_name = os.path.join(config_dir_path, server_name)
 
         if generate_secrets: