Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 9, 2023
1 parent fb39768 commit a0463d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions jwt/jwks_client.py
Expand Up @@ -6,7 +6,7 @@

from .api_jwk import PyJWK, PyJWKSet
from .api_jwt import decode_complete as decode_token
from .exceptions import PyJWKClientError, PyJWKClientConnectionError
from .exceptions import PyJWKClientConnectionError, PyJWKClientError
from .jwk_set_cache import JWKSetCache


Expand Down Expand Up @@ -51,7 +51,9 @@ def fetch_data(self) -> Any:
with urllib.request.urlopen(r, timeout=self.timeout) as response:
jwk_set = json.load(response)
except (URLError, TimeoutError) as e:
raise PyJWKClientConnectionError(f'Fail to fetch data from the url, err: "{e}"')
raise PyJWKClientConnectionError(
f'Fail to fetch data from the url, err: "{e}"'
)
else:
return jwk_set
finally:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_jwks_client.py
Expand Up @@ -9,7 +9,7 @@
import jwt
from jwt import PyJWKClient
from jwt.api_jwk import PyJWK
from jwt.exceptions import PyJWKClientError, PyJWKClientConnectionError
from jwt.exceptions import PyJWKClientConnectionError, PyJWKClientError

from .utils import crypto_required

Expand Down

0 comments on commit a0463d7

Please sign in to comment.