Skip to content

Commit e7a3b33

Browse files
committed
Improve typing in jwks_client
1 parent 955c612 commit e7a3b33

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jwt/jwks_client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import json
22
import urllib.request
33
from functools import lru_cache
4-
from typing import Any, List, Optional
4+
from typing import Any, Dict, List, Optional
55
from urllib.error import URLError
66

77
from .api_jwk import PyJWK, PyJWKSet
@@ -18,8 +18,10 @@ def __init__(
1818
max_cached_keys: int = 16,
1919
cache_jwk_set: bool = True,
2020
lifespan: int = 300,
21-
headers: dict = {},
21+
headers: Optional[Dict[str, Any]] = None,
2222
):
23+
if headers is None:
24+
headers = {}
2325
self.uri = uri
2426
self.jwk_set_cache: Optional[JWKSetCache] = None
2527
self.headers = headers

0 commit comments

Comments
 (0)