Skip to content

Commit efc80ab

Browse files
committed
lint
1 parent 830e4da commit efc80ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cryptojwt/jwk/jwk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def ensure_params(kty, provided, required):
5959
raise MissingValue('Missing properties for kty={}, {}'.format(kty, str(list(missing))))
6060

6161

62-
def key_from_jwk_dict(jwk_dict, private = None):
62+
def key_from_jwk_dict(jwk_dict, private=None):
6363
"""Load JWK from dictionary
6464
6565
:param jwk_dict: Dictionary representing a JWK
@@ -138,13 +138,13 @@ def key_from_jwk_dict(jwk_dict, private = None):
138138
else:
139139
_jwk_dict['pub_key'] = rsa_pub_numbers.public_key(
140140
backends.default_backend())
141-
141+
142142
if _jwk_dict['kty'] != "RSA":
143143
raise WrongKeyType('"{}" should have been "RSA"'.format(_jwk_dict[
144144
'kty']))
145145
return RSAKey(**_jwk_dict)
146146
elif _jwk_dict['kty'] == 'oct':
147-
if not 'key' in _jwk_dict and not 'k' in _jwk_dict:
147+
if 'key' not in _jwk_dict and 'k' not in _jwk_dict:
148148
raise MissingValue(
149149
'There has to be one of "k" or "key" in a symmetric key')
150150

0 commit comments

Comments
 (0)