Skip to content

Commit d446551

Browse files
committed
style: fix black formatting
1 parent e83b517 commit d446551

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

packages/google-auth/google/oauth2/id_token.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ def verify_token(
157157
break
158158

159159
if signing_key is None:
160-
raise PyJWKClientError(f'Unable to find a signing key that matches: "{kid}"')
160+
raise PyJWKClientError(
161+
f'Unable to find a signing key that matches: "{kid}"'
162+
)
161163

162164
return jwt_lib.decode(
163165
id_token,

packages/google-auth/tests/oauth2/test_id_token.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ def test_verify_token_jwk(decode, get_unverified_header, py_jwk_set, _fetch_cert
121121
@mock.patch("jwt.api_jwk.PyJWKSet", autospec=True)
122122
@mock.patch("jwt.get_unverified_header", autospec=True)
123123
@mock.patch("jwt.decode", autospec=True)
124-
def test_verify_token_jwk_missing_kid(decode, get_unverified_header, py_jwk_set, _fetch_certs):
124+
def test_verify_token_jwk_missing_kid(
125+
decode, get_unverified_header, py_jwk_set, _fetch_certs
126+
):
125127
from jwt.exceptions import PyJWKClientError
126128

127129
certs_url = "abc123"
@@ -136,13 +138,14 @@ def test_verify_token_jwk_missing_kid(decode, get_unverified_header, py_jwk_set,
136138
mock_key.algorithm_name = "mock-alg"
137139
py_jwk_set.from_dict.return_value.keys = [mock_key]
138140

139-
with pytest.raises(PyJWKClientError, match='Unable to find a signing key that matches: "mock-kid"'):
141+
with pytest.raises(
142+
PyJWKClientError, match='Unable to find a signing key that matches: "mock-kid"'
143+
):
140144
id_token.verify_token(
141145
mock.sentinel.token, mock.sentinel.request, certs_url=certs_url
142146
)
143147

144148

145-
146149
@mock.patch("google.auth.jwt.decode", autospec=True)
147150
@mock.patch("google.oauth2.id_token._fetch_certs", autospec=True)
148151
def test_verify_token_args(_fetch_certs, decode):

0 commit comments

Comments
 (0)