From 440365bb424e33c69ad1aafe3c3faa96cbc43043 Mon Sep 17 00:00:00 2001 From: Timo Ewalds Date: Fri, 12 May 2023 10:33:10 +0100 Subject: Fix a few errors found by pytype. (#906) * Fix pytype error: File "websocket/_wsdump.py", line 107, in : Overriding method signature mismatch [signature-mismatch] Base signature: 'def code.InteractiveConsole.raw_input(self, prompt: str = ...) -> str'. Subclass signature: 'def RawInput.raw_input(self, prompt) -> Any'. Parameter 'prompt' must have a default value. * Fix pytype error: File "websocket/tests/echo-server.py", line 18, in main: Function Serve.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ws_handler, host, port: Optional[int] = ..., ...) Actually passed: (self, ws_handler, host, port: str) * Fix undefined variable error found by pytype: File "compliance/test_fuzzingclient.py", line 57, in : Name 'case' is not defined [name-error] --- compliance/test_fuzzingclient.py | 1 + 1 file changed, 1 insertion(+) (limited to 'compliance/test_fuzzingclient.py') diff --git a/compliance/test_fuzzingclient.py b/compliance/test_fuzzingclient.py index 48db6e1..2d33d54 100644 --- a/compliance/test_fuzzingclient.py +++ b/compliance/test_fuzzingclient.py @@ -30,6 +30,7 @@ count = json.loads(ws.recv()) ws.close() +case = 0 for case in range(1, count + 1): url = SERVER + '/runCase?case={0}&agent={1}'.format(case, AGENT) status = websocket.STATUS_NORMAL -- cgit v1.2.1