From 84d2c4a3c3d71dbb15468020eae3e23e94c543c8 Mon Sep 17 00:00:00 2001 From: stoyan-atanasov-beye Date: Mon, 22 Sep 2025 15:32:35 +0200 Subject: [PATCH] change the `get_auth` function signature to use a bare `*` instead of `*_,` so that the function requires keyword-only args without introducing an untyped varargs parameter. Why: - Currently `get_auth` is defined as `def get_auth(*_, client_id: str, ...)` which accepts arbitrary positional args via `*_`. - The untyped varargs show up to type-checkers (Pylance/Pyright) as `Unknown` and leads to diagnostics like `reportUnknownVariableType` in consumer projects (even when `python.analysis.useLibraryCodeForTypes` is enabled). - Replacing `*_,` with `*` keeps the function semantics (forces subsequent parameters to be keyword-only) without introducing an untyped parameter that causes analyzer warnings. --- fastapi_oidc/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi_oidc/auth.py b/fastapi_oidc/auth.py index 999306b..dc0b28b 100644 --- a/fastapi_oidc/auth.py +++ b/fastapi_oidc/auth.py @@ -34,7 +34,7 @@ def test_auth(authenticated_user: AuthenticatedUser = Depends(authenticate_user) def get_auth( - *_, + *, client_id: str, audience: Optional[str] = None, base_authorization_server_uri: str,