Skip to content

Commit

Permalink
Fix remaining instances of shortcut imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaugustin committed Nov 9, 2024
1 parent 9b3595d commit 5f34e27
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/topics/broadcast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ to::

Here's a coroutine that broadcasts a message to all clients::

from websockets import ConnectionClosed
from websockets.exceptions import ConnectionClosed

async def broadcast(message):
for websocket in CLIENTS.copy():
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/keepalive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ You can run a task in the background to send keepalive messages:
import itertools
import json
from websockets import ConnectionClosed
from websockets.exceptions import ConnectionClosed
async def keepalive(websocket, ping_interval=30):
for ping in itertools.count():
Expand Down
2 changes: 1 addition & 1 deletion experiments/broadcast/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import sys
import time

from websockets import ConnectionClosed
from websockets.asyncio.server import broadcast, serve
from websockets.exceptions import ConnectionClosed


CLIENTS = set()
Expand Down

0 comments on commit 5f34e27

Please sign in to comment.