Skip to content
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

feat: add some typing #219

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roborock/local_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def hello(self):
except Exception as e:
self._logger.error(e)

async def ping(self):
async def ping(self) -> None:
request_id = 2
protocol = RoborockMessageProtocol.PING_REQUEST
return await self.send_message(
Expand Down
6 changes: 3 additions & 3 deletions roborock/version_1_apis/roborock_client_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def async_value(self):
def stop(self):
self.task.cancel()

async def update_value(self, params):
async def update_value(self, params) -> None:
if self.attribute.set_command is None:
raise RoborockException(f"{self.attribute.attribute} have no set command")
response = await self.api._send_command(self.attribute.set_command, params)
Expand All @@ -119,7 +119,7 @@ async def add_value(self, params):
await self._async_value()
return response

async def close_value(self, params=None):
async def close_value(self, params=None) -> None:
if self.attribute.close_command is None:
raise RoborockException(f"{self.attribute.attribute} have no close command")
response = await self.api._send_command(self.attribute.close_command, params)
Expand Down Expand Up @@ -154,7 +154,7 @@ def release(self):
super().release()
[item.stop() for item in self.cache.values()]

async def async_release(self):
async def async_release(self) -> None:
await super().async_release()
[item.stop() for item in self.cache.values()]

Expand Down
Loading