websocket-client icon indicating copy to clipboard operation
websocket-client copied to clipboard

Inconsistent function return values

Open engn33r opened this issue 2 years ago • 0 comments

While fixing mypy errors, the following inconsistencies in function return values were found:

  • handleDisconnect() in _app.py is missing a return statement
  • extract_error_code() in _utils.py is missing a return statement if the branching logic is not entered
  • read() in _app.py expects a return value from timeout() (which is declared in multiple locations)
  • read() in _app.py expects teardown() to return a bool
  • _send() and _recv() in _socket.py only return a value if a logic branch is entered

The errors were detected using mypy websocket --no-strict-optional

engn33r avatar Dec 03 '23 12:12 engn33r