File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def RunScript(self,
3636 sc .sticky .setdefault (f'{ prefix } _prev_load' , False ) # previous state of toggle
3737 sc .sticky .setdefault (f'{ prefix } _thread_running' , False ) # is a background thread running?
3838
39- def _import_job (url : str ):
39+ def _import_job (url : str ) -> None :
4040
4141 """
4242 Downloads and imports a .ply file from a given URL in a background thread.
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def RunScript(self,
4545 sc .sticky .setdefault (f'{ prefix } _prev_load' , False )
4646
4747 # Client handler
48- def handle_client (conn ) :
48+ def handle_client (conn : socket . socket ) -> None :
4949 """
5050 Reads the incoming bytes from a single TCP client socket and stores valid data in a shared buffer.
5151
@@ -76,7 +76,7 @@ def handle_client(conn):
7676 time .sleep (0.05 ) # sleep briefly to prevent CPU spin
7777
7878 # thread to accept incoming connections
79- def server_loop (sock ) :
79+ def server_loop (sock : socket . socket ) -> None :
8080 """
8181 Accepts a single client connection and starts a background thread to handle it.
8282
@@ -92,7 +92,7 @@ def server_loop(sock):
9292 pass
9393
9494 # Start TCP server
95- def start_server ():
95+ def start_server () -> None :
9696 """
9797 creates and binds a TCP socket on the given host/port, marks the server as started and then starts the accept_loop in a background thread
9898
@@ -108,7 +108,7 @@ def start_server():
108108 # Only accept one connection to keep it long-lived
109109 threading .Thread (target = server_loop , args = (sock ,), daemon = True ).start ()
110110
111- def stop_server ():
111+ def stop_server () -> None :
112112 """
113113 Stops the running TCP server by closing the listening socket and resetting internal state.
114114
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def RunScript(self,
6666 # START server
6767 if i_start and not sc .sticky [f'{ prefix } _thread_started' ]:
6868
69- async def echo (ws , path ) :
69+ async def echo (ws , path : str ) -> None :
7070 """
7171 Handles a single WebSocket client connection and reads messages containing point cloud data.
7272
@@ -92,7 +92,7 @@ async def echo(ws, path):
9292 except Exception as outer :
9393 logs .append (f"Handler crashed: { outer } " )
9494
95- async def server_coro ():
95+ async def server_coro () -> None :
9696 """
9797 Coroutine that starts the WebSocket server and waits for it to be closed.
9898
@@ -109,7 +109,7 @@ async def server_coro():
109109 await server .wait_closed ()
110110 logs .append ("Server coroutine exited" )
111111
112- def run_server ():
112+ def run_server () -> None :
113113 """
114114 Blocking function that runs the WebSocket server coroutine in this thread.
115115
You can’t perform that action at this time.
0 commit comments