diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-09-23 07:13:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-23 07:13:34 -0400 |
commit | e584534403b55ad3f250f92592e30b15b01f0201 (patch) | |
tree | 5561c7ba12f99eb72531b5b7ad3d60c7cd306b54 /synapse/handlers/password_policy.py | |
parent | Remove unnecessary parentheses around tuples returned from methods (#10889) (diff) | |
download | synapse-e584534403b55ad3f250f92592e30b15b01f0201.tar.xz |
Use direct references for some configuration variables (part 3) (#10885)
This avoids the overhead of searching through the various configuration classes by directly referencing the class that the attributes are in. It also improves type hints since mypy can now resolve the types of the configuration variables.
Diffstat (limited to 'synapse/handlers/password_policy.py')
-rw-r--r-- | synapse/handlers/password_policy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/password_policy.py b/synapse/handlers/password_policy.py index cd21efdcc6..eadd7ced09 100644 --- a/synapse/handlers/password_policy.py +++ b/synapse/handlers/password_policy.py @@ -27,8 +27,8 @@ logger = logging.getLogger(__name__) class PasswordPolicyHandler: def __init__(self, hs: "HomeServer"): - self.policy = hs.config.password_policy - self.enabled = hs.config.password_policy_enabled + self.policy = hs.config.auth.password_policy + self.enabled = hs.config.auth.password_policy_enabled # Regexps for the spec'd policy parameters. self.regexp_digit = re.compile("[0-9]") |