Skip to content

Commit

Permalink
Modify format to comply flake8 regulation
Browse files Browse the repository at this point in the history
  • Loading branch information
yihong1120 committed Dec 4, 2024
1 parent 5f1b0d1 commit 7328318
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/YOLO_server_api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
sio_app = socketio.ASGIApp(sio, app)

# Define Socket.IO events


@sio.event
async def connect(sid: str, environ: dict) -> None:
"""
Expand All @@ -67,6 +69,8 @@ async def disconnect(sid: str) -> None:
print('Client disconnected:', sid)

# Define lifespan event to manage the application startup and shutdown


@asynccontextmanager
async def lifespan(app: FastAPI) -> AsyncGenerator[None]:
"""
Expand Down
3 changes: 2 additions & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def on_modified(self, event):
if event_path == self.file_path:
print(f"[DEBUG] Configuration file modified: {event_path}")
asyncio.run_coroutine_threadsafe(
self.callback(), self.loop, # Ensure the callback is run in the loop
# Ensure the callback is run in the loop
self.callback(), self.loop,
)


Expand Down

0 comments on commit 7328318

Please sign in to comment.