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-08-06 09:39:59 -0400
committerGitHub <noreply@github.com>2021-08-06 09:39:59 -0400
commit1de26b346796ec8d6b51b4395017f8107f640c47 (patch)
treea3b5c2d5ce6d179992a24468ffb71b51461973a2 /synapse/federation/persistence.py
parentFix exceptions in logs when failing to get remote room list (#10541) (diff)
downloadsynapse-1de26b346796ec8d6b51b4395017f8107f640c47.tar.xz
Convert Transaction and Edu object to attrs (#10542)
Instead of wrapping the JSON into an object, this creates concrete
instances for Transaction and Edu. This allows for improved type
hints and simplified code.
Diffstat (limited to 'synapse/federation/persistence.py')
-rw-r--r--synapse/federation/persistence.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/federation/persistence.py b/synapse/federation/persistence.py
index 2f9c9bc2cd..4fead6ca29 100644
--- a/synapse/federation/persistence.py
+++ b/synapse/federation/persistence.py
@@ -45,7 +45,7 @@ class TransactionActions:
             `None` if we have not previously responded to this transaction or a
             2-tuple of `(int, dict)` representing the response code and response body.
         """
-        transaction_id = transaction.transaction_id  # type: ignore
+        transaction_id = transaction.transaction_id
         if not transaction_id:
             raise RuntimeError("Cannot persist a transaction with no transaction_id")
 
@@ -56,7 +56,7 @@ class TransactionActions:
         self, origin: str, transaction: Transaction, code: int, response: JsonDict
     ) -> None:
         """Persist how we responded to a transaction."""
-        transaction_id = transaction.transaction_id  # type: ignore
+        transaction_id = transaction.transaction_id
         if not transaction_id:
             raise RuntimeError("Cannot persist a transaction with no transaction_id")