Skip to content

Commit 6d458ef

Browse files
committed
Unnecessary list comprehension - 'any' can take a generator
1 parent ec7e03b commit 6d458ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jose/jwk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __init__(self, key, algorithm):
110110
b'ssh-rsa'
111111
]
112112

113-
if any([string_value in key for string_value in invalid_strings]):
113+
if any(string_value in key for string_value in invalid_strings):
114114
raise JWKError(
115115
'The specified key is an asymmetric key or x509 certificate and'
116116
' should not be used as an HMAC secret.')

0 commit comments

Comments
 (0)