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/saml2.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'synapse/config/saml2.py') diff --git a/synapse/config/saml2.py b/synapse/config/saml2.py index 43c456d5c6..19b2f1b215 100644 --- a/synapse/config/saml2.py +++ b/synapse/config/saml2.py @@ -65,7 +65,7 @@ def _dict_merge(merge_dict: dict, into_dict: dict) -> None: class SAML2Config(Config): section = "saml2" - def read_config(self, config, **kwargs) -> None: + def read_config(self, config: JsonDict, **kwargs: Any) -> None: self.saml2_enabled = False saml2_config = config.get("saml2_config") @@ -165,13 +165,13 @@ class SAML2Config(Config): config_path = saml2_config.get("config_path", None) if config_path is not None: mod = load_python_module(config_path) - config = getattr(mod, "CONFIG", None) - if config is None: + config_dict_from_file = getattr(mod, "CONFIG", None) + if config_dict_from_file is None: raise ConfigError( "Config path specified by saml2_config.config_path does not " "have a CONFIG property." ) - _dict_merge(merge_dict=config, into_dict=saml2_config_dict) + _dict_merge(merge_dict=config_dict_from_file, into_dict=saml2_config_dict) import saml2.config @@ -223,7 +223,7 @@ class SAML2Config(Config): }, } - def generate_config_section(self, config_dir_path, server_name, **kwargs) -> str: + def generate_config_section(self, config_dir_path: str, **kwargs: Any) -> str: return """\ ## Single sign-on integration ## -- cgit 1.4.1