Bladeren bron

fix example for Python 3.8

Rodja Trappe 1 jaar geleden
bovenliggende
commit
c9639126d1
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      examples/websockets/main.py

+ 2 - 1
examples/websockets/main.py

@@ -5,13 +5,14 @@ NOTE: NiceGUI already handles all the communication for you so you don't need to
 This example is only for advanced use cases where you want to allow other, non-NiceGUI clients to connect to your server.
 """
 import asyncio
+from typing import Set
 
 import websockets
 from websockets.server import WebSocketServerProtocol
 
 from nicegui import app, ui
 
-CONNECTIONS: set[WebSocketServerProtocol] = set()
+CONNECTIONS: Set[WebSocketServerProtocol] = set()
 
 ui.label('Websockets demo').classes('text-2xl')
 ui.label('Run this in the console to connect:')