diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-04-11 12:07:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-11 12:07:23 -0400 |
commit | 4586119f0b0901be64f08655d3aaaef289a51bde (patch) | |
tree | 8150ea6084a6a7a034d272654720333d01b75b9f /synapse/config/saml2.py | |
parent | Enable certificate checking during complement tests (#12435) (diff) | |
download | synapse-4586119f0b0901be64f08655d3aaaef289a51bde.tar.xz |
Add missing type hints to config classes. (#12402)
Diffstat (limited to 'synapse/config/saml2.py')
-rw-r--r-- | synapse/config/saml2.py | 10 |
1 files changed, 5 insertions, 5 deletions
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 ## |