Skip to content

Commit b569dc1

Browse files
committed
refactor: websockets serve import
Newest websockets library doesn't work anymore with: `from websockets.server import serve`
1 parent 0e4796e commit b569dc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ucapi/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
# workaround for pylint error: E0611: No name 'ConnectionClosedOK' in module 'websockets' (no-name-in-module) # noqa
2020
from websockets.exceptions import ConnectionClosedOK
2121

22-
# workaround for pylint error: E1101: Module 'websockets' has no 'serve' member (no-member) # noqa
23-
from websockets.server import serve
22+
# Note: websockets ~v15 doesn't have websockets.server anymore
23+
from websockets import serve
2424
from zeroconf import IPVersion
2525
from zeroconf.asyncio import AsyncServiceInfo, AsyncZeroconf
2626

0 commit comments

Comments
 (0)