diff --git a/synapse/replication/tcp/protocol.py b/synapse/replication/tcp/protocol.py index 995b47a1eddf..db78b4f4bb04 100644 --- a/synapse/replication/tcp/protocol.py +++ b/synapse/replication/tcp/protocol.py @@ -130,7 +130,7 @@ class BaseReplicationStreamProtocol(LineOnlyReceiver): max_line_buffer = 10000 - def __init__(self, clock, handler): + def __init__(self, clock: Clock, handler: "ReplicationCommandHandler"): self.clock = clock self.handler = handler @@ -420,7 +420,9 @@ class ServerReplicationStreamProtocol(BaseReplicationStreamProtocol): VALID_INBOUND_COMMANDS = VALID_CLIENT_COMMANDS VALID_OUTBOUND_COMMANDS = VALID_SERVER_COMMANDS - def __init__(self, server_name, clock, handler): + def __init__( + self, server_name: str, clock: Clock, handler: "ReplicationCommandHandler" + ): BaseReplicationStreamProtocol.__init__(self, clock, handler) # Old style class self.server_name = server_name