plan(SP22): Task 7 — replace assert with RuntimeError in list_*_acks methods
This commit is contained in:
@@ -1370,7 +1370,8 @@ Add the methods to the `CycloneClient` class:
|
||||
|
||||
```python
|
||||
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(
|
||||
"/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]:
|
||||
assert self._http is not None
|
||||
if self._http is None:
|
||||
raise RuntimeError("use `async with CycloneClient(...)`")
|
||||
resp = await self._http.get(
|
||||
"/api/acks", params={"since": since}
|
||||
)
|
||||
@@ -1394,7 +1396,8 @@ Add the methods to the `CycloneClient` class:
|
||||
async def list_remittances(
|
||||
self, since: str
|
||||
) -> list[RemittanceSummary]:
|
||||
assert self._http is not None
|
||||
if self._http is None:
|
||||
raise RuntimeError("use `async with CycloneClient(...)`")
|
||||
resp = await self._http.get(
|
||||
"/api/remittances", params={"since": since}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user