Skip to content

Commit 1ac6d80

Browse files
committed
fix(kernel): annotate kwargs at first assignment to satisfy mypy
The JWT branch introduced an earlier untyped `kwargs =`, so mypy flagged the M2M branch's `kwargs: Dict[str, Any]` as a redefinition. Move the annotation to the first (JWT) assignment. Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
1 parent 452b426 commit 1ac6d80

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/databricks/sql/backend/kernel/auth_bridge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def kernel_auth_kwargs(
273273
"requires oauth_jwt_kid (the key id written into the JWT "
274274
"header so the IdP can select the registered public key)."
275275
)
276-
kwargs = {
276+
kwargs: Dict[str, Any] = {
277277
"auth_type": "oauth-m2m-jwt",
278278
"client_id": client_id,
279279
"jwt_key_file": jwt_key_file,
@@ -297,7 +297,7 @@ def kernel_auth_kwargs(
297297

298298
# 2. OAuth M2M — raw client-credentials pair forwarded to the kernel.
299299
if has_m2m:
300-
kwargs: Dict[str, Any] = {
300+
kwargs = {
301301
"auth_type": "oauth-m2m",
302302
"client_id": client_id,
303303
"client_secret": client_secret,

0 commit comments

Comments
 (0)