-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asyncio-iot #491
base: master
Are you sure you want to change the base?
asyncio-iot #491
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gj!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on implementing the asynchronous operations and meeting the task requirements! 🎉 The code is well-structured and effectively uses asyncio
. Just a couple of minor suggestions: consider removing the redundant call to self.send_msg(msg)
in service.py
to streamline the code, and adding a comment in the .gitignore
file to clarify why the .venv/
directory is ignored. Keep up the excellent work! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
@@ -3,6 +3,6 @@ | |||
*.iml | |||
.env | |||
.DS_Store | |||
venv/ | |||
.venv/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a comment to explain why the .venv/
directory is being ignored. This can help other developers understand the purpose of this entry.
del self.devices[device_id] | ||
|
||
def get_device(self, device_id: str) -> Device: | ||
return self.devices[device_id] | ||
|
||
def run_program(self, program: list[Message]) -> None: | ||
async def run_program(self, program: list[Message]) -> None: | ||
print("=====RUNNING PROGRAM======") | ||
for msg in program: | ||
self.send_msg(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The call to self.send_msg(msg)
is redundant since await self.send_msg(msg)
is already being called in the next line. You should remove this line to avoid unnecessary operations.
No description provided.