Add typing

pull/7187/head
Erik Johnston 2020-04-06 10:07:27 +01:00
parent cadb3f57dd
commit dd93e91b24
1 changed files with 4 additions and 2 deletions

View File

@ -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