mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-09 16:24:38 +00:00
fix(mypy): add union-attr suppression to all backend_ws method calls
Address Greptile review: apply type: ignore[union-attr] consistently on all backend_ws.send(), .recv(), and .close() calls, not just the three that CI flagged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
494d783a80
commit
21d958e46d
@@ -502,11 +502,11 @@ class RealTimeStreaming:
|
||||
try:
|
||||
while True:
|
||||
try:
|
||||
raw_response = await self.backend_ws.recv(
|
||||
raw_response = await self.backend_ws.recv( # type: ignore[union-attr]
|
||||
decode=False
|
||||
) # improves performance
|
||||
except TypeError:
|
||||
raw_response = await self.backend_ws.recv() # type: ignore[assignment]
|
||||
raw_response = await self.backend_ws.recv() # type: ignore[union-attr, assignment]
|
||||
|
||||
if self.provider_config:
|
||||
try:
|
||||
@@ -573,9 +573,9 @@ class RealTimeStreaming:
|
||||
)
|
||||
|
||||
for msg in message:
|
||||
await self.backend_ws.send(msg)
|
||||
await self.backend_ws.send(msg) # type: ignore[union-attr]
|
||||
else:
|
||||
await self.backend_ws.send(message)
|
||||
await self.backend_ws.send(message) # type: ignore[union-attr]
|
||||
|
||||
except Exception as e:
|
||||
verbose_logger.debug(f"Error in client ack messages: {e}")
|
||||
|
||||
Reference in New Issue
Block a user