summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-07-16 13:52:29 +0100
committerGitHub <noreply@github.com>2020-07-16 13:52:29 +0100
commita973bcb8a4dd73cc504a2928a5a4bd30ebf4aeae (patch)
tree199a0621b184f3ef16d53a497cb74aee605f6964 /synapse/handlers
parentRemove obsolete comment. (diff)
downloadsynapse-a973bcb8a4dd73cc504a2928a5a4bd30ebf4aeae.tar.xz
Add some tiny type annotations (#7870)
I found these made pycharm have more of a clue as to what was going on in other places.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/_base.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index 61dc4beafe..6a4944467a 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -17,6 +17,8 @@ import logging
 
 from twisted.internet import defer
 
+import synapse.state
+import synapse.storage
 import synapse.types
 from synapse.api.constants import EventTypes, Membership
 from synapse.api.ratelimiting import Ratelimiter
@@ -28,10 +30,6 @@ logger = logging.getLogger(__name__)
 class BaseHandler(object):
     """
     Common base class for the event handlers.
-
-    Attributes:
-        store (synapse.storage.DataStore):
-        state_handler (synapse.state.StateHandler):
     """
 
     def __init__(self, hs):
@@ -39,10 +37,10 @@ class BaseHandler(object):
         Args:
             hs (synapse.server.HomeServer):
         """
-        self.store = hs.get_datastore()
+        self.store = hs.get_datastore()  # type: synapse.storage.DataStore
         self.auth = hs.get_auth()
         self.notifier = hs.get_notifier()
-        self.state_handler = hs.get_state_handler()
+        self.state_handler = hs.get_state_handler()  # type: synapse.state.StateHandler
         self.distributor = hs.get_distributor()
         self.clock = hs.get_clock()
         self.hs = hs