@@ -216,7 +216,7 @@ def check_use(self, use: str) -> None:
216216 requires its presence.
217217
218218 :param use: this key is used for, e.g. "sig", "enc"
219- :raise: UnsupportedKeyUseError
219+ :raise UnsupportedKeyUseError: if this key is not designed for the given use
220220 """
221221 designed_use = self .get ("use" )
222222 if designed_use and designed_use != use :
@@ -226,7 +226,7 @@ def check_alg(self, alg: str) -> None:
226226 """Check if this key supports the given "alg".
227227
228228 :param alg: the algorithm this key is intended to be used, e.g. "HS256", "ECDH-EC"
229- :raise: UnsupportedKeyAlgorithmError
229+ :raise UnsupportedKeyAlgorithmError: if this key is not designed for the given algorithm
230230 """
231231 designed_alg = self .get ("alg" )
232232 if designed_alg and designed_alg != alg :
@@ -236,7 +236,7 @@ def check_key_op(self, operation: str) -> None:
236236 """Check if the given key_op is supported by this key.
237237
238238 :param operation: key operation value, such as "sign", "encrypt".
239- :raise: UnsupportedKeyOperationError
239+ :raise UnsupportedKeyOperationError: if the operation is not supported by this key.
240240 """
241241 key_ops = self .get ("key_ops" )
242242 if key_ops is not None and operation not in key_ops :
0 commit comments