Skip to content

Commit 35d0900

Browse files
authored
feat: add some typing (#219)
1 parent 8d6b5cd commit 35d0900

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

roborock/local_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def hello(self):
9696
except Exception as e:
9797
self._logger.error(e)
9898

99-
async def ping(self):
99+
async def ping(self) -> None:
100100
request_id = 2
101101
protocol = RoborockMessageProtocol.PING_REQUEST
102102
return await self.send_message(

roborock/version_1_apis/roborock_client_v1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async def async_value(self):
105105
def stop(self):
106106
self.task.cancel()
107107

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

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

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

0 commit comments

Comments
 (0)