Skip to content

Commit 9252e8b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4c8261e commit 9252e8b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

starfyre/js/store.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def get_signal(*args, **kwargs):
142142
# Assuming connection is already established
143143
connection = js.WebSocket("ws://localhost:8765")
144144

145+
145146
def server_state():
146147
id = random.randint(0, 100000)
147148

@@ -172,9 +173,11 @@ def get_server_signal():
172173

173174
return [use_server_signal, set_server_signal, get_server_signal]
174175

176+
175177
# Handle incoming WebSocket messages
176178
def on_message(event):
177179
data = json.loads(event.data)
178180
# Process the data, update local state, notify observers, etc.
179181

182+
180183
connection.onmessage = on_message

0 commit comments

Comments
 (0)