diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-01-15 16:00:24 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-01-15 16:00:24 +0000 |
commit | 107f256cd8c8d72c7a36df7e426aded09c5657c9 (patch) | |
tree | 788f2b18ebab979aa87462c7b1759da2e376320a /synapse/replication/http/_base.py | |
parent | changelog (diff) | |
parent | Implement RedirectException (#6687) (diff) | |
download | synapse-107f256cd8c8d72c7a36df7e426aded09c5657c9.tar.xz |
Merge branch 'develop' into rav/module_api_extensions
Diffstat (limited to 'synapse/replication/http/_base.py')
-rw-r--r-- | synapse/replication/http/_base.py | 10 |
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) |