summary refs log tree commit diff
path: root/synapse/replication/http
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-01-14 14:08:06 +0000
committerGitHub <noreply@github.com>2020-01-14 14:08:06 +0000
commite8b68a4e4b439065536c281d8997af85880f6ee2 (patch)
tree789fbafaf84ba78548ad6c924770aafeb986a635 /synapse/replication/http
parentQuarantine media by ID or user ID (#6681) (diff)
downloadsynapse-e8b68a4e4b439065536c281d8997af85880f6ee2.tar.xz
Fixup synapse.replication to pass mypy checks (#6667)
Diffstat (limited to 'synapse/replication/http')
-rw-r--r--synapse/replication/http/_base.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/replication/http/_base.py b/synapse/replication/http/_base.py
index c8056b0c0c..444eb7b7f4 100644
--- a/synapse/replication/http/_base.py
+++ b/synapse/replication/http/_base.py
@@ -16,6 +16,7 @@
 import abc
 import logging
 import re
+from typing import Dict, List, Tuple
 
 from six import raise_from
 from six.moves import urllib
@@ -78,9 +79,8 @@ class ReplicationEndpoint(object):
 
     __metaclass__ = abc.ABCMeta
 
-    NAME = abc.abstractproperty()
-    PATH_ARGS = abc.abstractproperty()
-
+    NAME = abc.abstractproperty()  # type: str  # type: ignore
+    PATH_ARGS = abc.abstractproperty()  # type: Tuple[str, ...]  # type: ignore
     METHOD = "POST"
     CACHE = True
     RETRY_ON_TIMEOUT = True
@@ -171,7 +171,7 @@ class ReplicationEndpoint(object):
                 # have a good idea that the request has either succeeded or failed on
                 # the master, and so whether we should clean up or not.
                 while True:
-                    headers = {}
+                    headers = {}  # type: Dict[bytes, List[bytes]]
                     inject_active_span_byte_dict(headers, None, check_destination=False)
                     try:
                         result = yield request_func(uri, data, headers=headers)
@@ -207,7 +207,7 @@ class ReplicationEndpoint(object):
         method = self.METHOD
 
         if self.CACHE:
-            handler = self._cached_handler
+            handler = self._cached_handler  # type: ignore
             url_args.append("txn_id")
 
         args = "/".join("(?P<%s>[^/]+)" % (arg,) for arg in url_args)