summary refs log tree commit diff
path: root/synapse/push/push_tools.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-12-07 09:59:38 -0500
committerGitHub <noreply@github.com>2020-12-07 09:59:38 -0500
commit92d87c68824c17e02a8d9e7ca4f9c44b78426cfb (patch)
tree55dd2b6f3ceaf4253871b386fa486428f850fda7 /synapse/push/push_tools.py
parentAdd type hints to the push mailer module. (#8882) (diff)
downloadsynapse-92d87c68824c17e02a8d9e7ca4f9c44b78426cfb.tar.xz
Add type hints for HTTP and email pushers. (#8880)
Diffstat (limited to 'synapse/push/push_tools.py')
-rw-r--r--synapse/push/push_tools.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/push/push_tools.py b/synapse/push/push_tools.py
index 6e7c880dc0..df34103224 100644
--- a/synapse/push/push_tools.py
+++ b/synapse/push/push_tools.py
@@ -12,6 +12,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+from typing import Dict
+
+from synapse.events import EventBase
 from synapse.push.presentable_names import calculate_room_name, name_from_member_event
 from synapse.storage import Storage
 from synapse.storage.databases.main import DataStore
@@ -46,7 +49,9 @@ async def get_badge_count(store: DataStore, user_id: str, group_by_room: bool) -
     return badge
 
 
-async def get_context_for_event(storage: Storage, state_handler, ev, user_id):
+async def get_context_for_event(
+    storage: Storage, ev: EventBase, user_id: str
+) -> Dict[str, str]:
     ctx = {}
 
     room_state_ids = await storage.state.get_state_ids_for_event(ev.event_id)