summary refs log tree commit diff
path: root/synapse/federation/persistence.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-12-02 11:18:10 -0500
committerGitHub <noreply@github.com>2021-12-02 16:18:10 +0000
commitd2279f471ba8f44d9f578e62b286897a338d8aa1 (patch)
tree8b17a34a518a7f3a1d68510fb46dbd3b105995b3 /synapse/federation/persistence.py
parentAvoid waiting for zombie processes in `synctl stop` (#11490) (diff)
downloadsynapse-d2279f471ba8f44d9f578e62b286897a338d8aa1.tar.xz
Add most of the missing type hints to `synapse.federation`. (#11483)
This skips a few methods which are difficult to type.
Diffstat (limited to 'synapse/federation/persistence.py')
-rw-r--r--synapse/federation/persistence.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/federation/persistence.py b/synapse/federation/persistence.py
index 4fead6ca29..523ab1c51e 100644
--- a/synapse/federation/persistence.py
+++ b/synapse/federation/persistence.py
@@ -1,4 +1,5 @@
 # Copyright 2014-2016 OpenMarket Ltd
+# Copyright 2021 The Matrix.org Foundation C.I.C.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,6 +24,7 @@ from typing import Optional, Tuple
 
 from synapse.federation.units import Transaction
 from synapse.logging.utils import log_function
+from synapse.storage.databases.main import DataStore
 from synapse.types import JsonDict
 
 logger = logging.getLogger(__name__)
@@ -31,7 +33,7 @@ logger = logging.getLogger(__name__)
 class TransactionActions:
     """Defines persistence actions that relate to handling Transactions."""
 
-    def __init__(self, datastore):
+    def __init__(self, datastore: DataStore):
         self.store = datastore
 
     @log_function