Skip to content

Commit

Permalink
style: remove unused import
Browse files Browse the repository at this point in the history
refactor: add `_resposne` to funciton name `get_about`
  • Loading branch information
NiklasNeugebauer committed Dec 5, 2024
1 parent 283cccf commit 8c004ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions learning_loop_node/detector/detector_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from datetime import datetime
from enum import Enum
from threading import Thread
from typing import Dict, List, Optional, Union
from typing import Dict, List, Optional

import numpy as np
import socketio
Expand Down Expand Up @@ -83,7 +83,7 @@ def __init__(self, name: str, detector: DetectorLogic, uuid: Optional[str] = Non

self.setup_sio_server()

def get_about(self) -> AboutResponse:
def get_about_response(self) -> AboutResponse:
return AboutResponse(
operation_mode=self.operation_mode.value,
state=self.status.state,
Expand Down Expand Up @@ -242,7 +242,7 @@ async def info(sid) -> Dict:

@self.sio.event
async def about(sid) -> Dict:
return asdict(self.get_about())
return asdict(self.get_about_response())

@self.sio.event
async def get_model_version(sid) -> Dict:
Expand Down
2 changes: 1 addition & 1 deletion learning_loop_node/detector/rest/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ async def get_about(request: Request):
curl http://hosturl/about
'''
app: 'DetectorNode' = request.app
return app.get_about()
return app.get_about_response()

0 comments on commit 8c004ec

Please sign in to comment.