Skip to content

Commit

Permalink
make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis committed Dec 12, 2024
1 parent 19728f5 commit f040401
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def get_licensed_items(
page_params: Annotated[PaginationParams, Depends()],
web_api_rpc: Annotated[WbApiRpcClient, Depends(get_wb_api_rpc_client)],
product_name: Annotated[str, Depends(get_product_name)],
) -> Page[LicensedItemGet]:
):
return await web_api_rpc.get_licensed_items(
product_name=product_name, page_params=page_params
)
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ async def _page_projects(
with service_exception_handler(
service_name="Webserver",
http_status_map={status.HTTP_404_NOT_FOUND: ListJobsError},
rpc_exception_map={},
):
resp = await self.client.get(
"/projects",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from dataclasses import dataclass
from functools import partial
from typing import cast

from fastapi import FastAPI
from fastapi_pagination import Page, create_page
Expand Down Expand Up @@ -29,7 +30,7 @@ async def get_licensed_items(
offset=page_params.offset,
limit=page_params.limit,
)
return create_page(
page = create_page(
[
LicensedItemGet(
licensed_item_id=elm.licensed_item_id,
Expand All @@ -44,6 +45,7 @@ async def get_licensed_items(
total=licensed_items_page.total,
params=page_params,
)
return cast(Page[LicensedItemGet], page)


def setup(app: FastAPI, rabbitmq_rmp_client: RabbitMQRPCClient):
Expand Down

0 comments on commit f040401

Please sign in to comment.