diff options
author | Jonathan de Jong <jonathan@automatia.nl> | 2021-07-16 19:22:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 18:22:36 +0100 |
commit | 98aec1cc9da2bd6b8e34ffb282c85abf9b8b42ca (patch) | |
tree | 82bb48929e2f63d543fba936cfb0f1f621ee3659 /synapse/handlers/_base.py | |
parent | Add a module type for account validity (#9884) (diff) | |
download | synapse-98aec1cc9da2bd6b8e34ffb282c85abf9b8b42ca.tar.xz |
Use inline type hints in `handlers/` and `rest/`. (#10382)
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r-- | synapse/handlers/_base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py index d800e16912..525f3d39b1 100644 --- a/synapse/handlers/_base.py +++ b/synapse/handlers/_base.py @@ -38,10 +38,10 @@ class BaseHandler: """ def __init__(self, hs: "HomeServer"): - self.store = hs.get_datastore() # type: synapse.storage.DataStore + self.store = hs.get_datastore() self.auth = hs.get_auth() self.notifier = hs.get_notifier() - self.state_handler = hs.get_state_handler() # type: synapse.state.StateHandler + self.state_handler = hs.get_state_handler() self.distributor = hs.get_distributor() self.clock = hs.get_clock() self.hs = hs @@ -55,12 +55,12 @@ class BaseHandler: # Check whether ratelimiting room admin message redaction is enabled # by the presence of rate limits in the config if self.hs.config.rc_admin_redaction: - self.admin_redaction_ratelimiter = Ratelimiter( + self.admin_redaction_ratelimiter: Optional[Ratelimiter] = Ratelimiter( store=self.store, clock=self.clock, rate_hz=self.hs.config.rc_admin_redaction.per_second, burst_count=self.hs.config.rc_admin_redaction.burst_count, - ) # type: Optional[Ratelimiter] + ) else: self.admin_redaction_ratelimiter = None |