Enable Ruff RUF013 (#115333)
This commit is contained in:
parent
7e1a5b19c4
commit
3efee10b95
28 changed files with 65 additions and 58 deletions
|
@ -189,7 +189,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(
|
||||
|
@ -203,7 +205,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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue