Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add typing
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Apr 6, 2020
1 parent cadb3f5 commit dd93e91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions synapse/replication/tcp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dd93e91

Please sign in to comment.