Skip to content

Commit

Permalink
type: ignores.
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxColoring committed Dec 21, 2024
1 parent a8704c6 commit d4f87ac
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server-utils/server_utils/fastapi_utils/fast_build_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def install_on_app(
router.install_on_app(app, **combined_kwargs)
else:
typing_extensions.assert_type(route, _Endpoint)
combined_kwargs = _merge_kwargs(kwargs, route.kwargs)
combined_kwargs = _merge_kwargs(
kwargs,
route.kwargs, # type: ignore[arg-type]
)
fastapi_method = getattr(app, route.method_name)
fastapi_decorator = fastapi_method(*route.args, **combined_kwargs)
fastapi_decorator(route.function)
Expand Down Expand Up @@ -183,10 +186,10 @@ def _merge_kwargs(
merge_result.update(remaining_from_child)
else:
a_collisions: dict[object, object] = {
k: remaining_from_parent[k] for k in colliding_keys
k: remaining_from_parent[k] for k in colliding_keys # type: ignore[literal-required]
}
b_collisions: dict[object, object] = {
k: remaining_from_child[k] for k in colliding_keys
k: remaining_from_child[k] for k in colliding_keys # type: ignore[literal-required]
}
raise NotImplementedError(
f"These FastAPI keyword arguments appear at different levels "
Expand Down

0 comments on commit d4f87ac

Please sign in to comment.