Skip to content

Commit

Permalink
fix: refine codes
Browse files Browse the repository at this point in the history
  • Loading branch information
halajohn committed Dec 23, 2024
1 parent f7aec6c commit 533846d
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ def __init__(
def __del__(self) -> None:
pass

a = send_cmd(...) ==> x, a.0, a.1
a, e = send_cmd(...)
a, _ = send_cmd(...)

send_cmd
asend_cmd

async def send_cmd(self, cmd: Cmd) -> (CmdResult, TenError):
async def send_cmd(self, cmd: Cmd) -> CmdResult:
q = asyncio.Queue(maxsize=1)
self._internal.send_cmd(
cmd,
Expand Down Expand Up @@ -77,7 +70,7 @@ async def send_cmd_ex(self, cmd: Cmd) -> AsyncGenerator[CmdResult, None]:
break
yield result

async def send_data(self, data: Data) -> TenError:
async def send_data(self, data: Data) -> None:
q = asyncio.Queue(maxsize=1)
self._internal.send_data(
data,
Expand Down

0 comments on commit 533846d

Please sign in to comment.