Mypy fix. This error was caused by the instance assertion being limited to the scope of the `try` section of the `try except finally` statement, with a call to ws._logger in the `finally` section not valid as the value of `ws` is now now less specific.
@@ -247,7 +247,7 @@ class _V6GatewayTransport(aiohttp.ClientWebSocketResponse):
raise errors.GatewayError(f"Unexpected {type(ex).__name__}: {ex}") from ex
finally:
if ws.closed:
- ws._logger.debug("ws was already closed")
+ logger.debug("ws was already closed")
elif raised:
await ws.close(
