mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Enable Ruff RUF013 (#115333)
This commit is contained in:
@@ -79,7 +79,9 @@ class Client:
|
||||
self.client = client
|
||||
self.id = 0
|
||||
|
||||
async def cmd(self, cmd: str, payload: dict[str, Any] = None) -> dict[str, Any]:
|
||||
async def cmd(
|
||||
self, cmd: str, payload: dict[str, Any] | None = None
|
||||
) -> dict[str, Any]:
|
||||
"""Send a command and receive the json result."""
|
||||
self.id += 1
|
||||
await self.client.send_json(
|
||||
@@ -93,7 +95,7 @@ class Client:
|
||||
assert resp.get("id") == self.id
|
||||
return resp
|
||||
|
||||
async def cmd_result(self, cmd: str, payload: dict[str, Any] = None) -> Any:
|
||||
async def cmd_result(self, cmd: str, payload: dict[str, Any] | None = None) -> Any:
|
||||
"""Send a command and parse the result."""
|
||||
resp = await self.cmd(cmd, payload)
|
||||
assert resp.get("success")
|
||||
|
||||
Reference in New Issue
Block a user