From 92c6eb554c4f3afd1fdec71e2908068790608d8b Mon Sep 17 00:00:00 2001 From: JohntheLi Date: Sat, 14 Dec 2024 07:46:03 +0900 Subject: [PATCH] fix pyright (#132) fix a lint error --- src/fastapi_poe/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fastapi_poe/base.py b/src/fastapi_poe/base.py index 1e35cea..09d76f8 100644 --- a/src/fastapi_poe/base.py +++ b/src/fastapi_poe/base.py @@ -715,8 +715,8 @@ async def _cost_requests_inner( self, amounts: Union[List[CostItem], CostItem], access_key: str, url: str ) -> bool: amounts = [amounts] if isinstance(amounts, CostItem) else amounts - amounts = [amount.model_dump() for amount in amounts] - data = {"amounts": amounts, "access_key": access_key} + amounts_dicts = [amount.model_dump() for amount in amounts] + data = {"amounts": amounts_dicts, "access_key": access_key} try: async with httpx.AsyncClient(timeout=300) as client, httpx_sse.aconnect_sse( client, method="POST", url=url, json=data