plan(SP22): Task 7 — replace assert with RuntimeError in list_*_acks methods

This commit is contained in:
Tyler
2026-06-21 13:56:14 -06:00
parent d0a18bd796
commit 9133baa070
@@ -1370,7 +1370,8 @@ Add the methods to the `CycloneClient` class:
```python ```python
async def list_ta1_acks(self, since: str) -> list[Ta1Ack]: async def list_ta1_acks(self, since: str) -> list[Ta1Ack]:
assert self._http is not None if self._http is None:
raise RuntimeError("use `async with CycloneClient(...)`")
resp = await self._http.get( resp = await self._http.get(
"/api/ta1-acks", params={"since": since} "/api/ta1-acks", params={"since": since}
) )
@@ -1381,7 +1382,8 @@ Add the methods to the `CycloneClient` class:
] ]
async def list_acks(self, since: str) -> list[Ack999]: async def list_acks(self, since: str) -> list[Ack999]:
assert self._http is not None if self._http is None:
raise RuntimeError("use `async with CycloneClient(...)`")
resp = await self._http.get( resp = await self._http.get(
"/api/acks", params={"since": since} "/api/acks", params={"since": since}
) )
@@ -1394,7 +1396,8 @@ Add the methods to the `CycloneClient` class:
async def list_remittances( async def list_remittances(
self, since: str self, since: str
) -> list[RemittanceSummary]: ) -> list[RemittanceSummary]:
assert self._http is not None if self._http is None:
raise RuntimeError("use `async with CycloneClient(...)`")
resp = await self._http.get( resp = await self._http.get(
"/api/remittances", params={"since": since} "/api/remittances", params={"since": since}
) )