summary refs log tree commit diff
path: root/tests/replication
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2021-11-12 15:50:54 +0000
committerGitHub <noreply@github.com>2021-11-12 15:50:54 +0000
commit4c96ce396e900a94af66ec070af925881b6e1e24 (patch)
tree446920e10d66c2ace553a68541ed64e0fbd543e1 /tests/replication
parentGeneralize the disallowed_untyped_defs in mypy.ini (#11322) (diff)
downloadsynapse-4c96ce396e900a94af66ec070af925881b6e1e24.tar.xz
Misc typing fixes for `tests`, part 1 of N (#11323)
* Annotate HomeserverTestCase.servlets
* Correct annotation of federation_auth_origin
* Use AnyStr custom_headers instead of a Union

This allows (str, str) and (bytes, bytes).
This disallows (str, bytes) and (bytes, str)

* DomainSpecificString.SIGIL is a ClassVar
Diffstat (limited to 'tests/replication')
-rw-r--r--tests/replication/_base.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/replication/_base.py b/tests/replication/_base.py
index eac4664b41..cb02eddf07 100644
--- a/tests/replication/_base.py
+++ b/tests/replication/_base.py
@@ -12,13 +12,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import logging
-from typing import Any, Callable, Dict, List, Optional, Tuple
+from typing import Any, Dict, List, Optional, Tuple
 
 from twisted.internet.protocol import Protocol
 from twisted.web.resource import Resource
 
 from synapse.app.generic_worker import GenericWorkerServer
-from synapse.http.server import JsonResource
 from synapse.http.site import SynapseRequest, SynapseSite
 from synapse.replication.http import ReplicationRestResource
 from synapse.replication.tcp.client import ReplicationDataHandler
@@ -220,8 +219,6 @@ class BaseMultiWorkerStreamTestCase(unittest.HomeserverTestCase):
     unlike `BaseStreamTestCase`.
     """
 
-    servlets: List[Callable[[HomeServer, JsonResource], None]] = []
-
     def setUp(self):
         super().setUp()