Ensure that *everything* is typed in community.crypto (#917)

* Ensure that *everything* is typed in community.crypto.

* Fix comment.

* Ignore type definitions/imports and AssertionErrors for code coverage.
This commit is contained in:
Felix Fontein
2025-06-09 10:10:19 +02:00
committed by GitHub
parent ec063d8515
commit d83a923325
73 changed files with 494 additions and 317 deletions

View File

@@ -179,7 +179,7 @@ def is_parent(
public_key, cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey
):
if cert.cert.signature_hash_algorithm is None:
raise AssertionError(
raise AssertionError( # pragma: no cover
"signature_hash_algorithm should be present for RSA certificates"
)
public_key.verify(
@@ -193,7 +193,7 @@ def is_parent(
cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey,
):
if cert.cert.signature_hash_algorithm is None:
raise AssertionError(
raise AssertionError( # pragma: no cover
"signature_hash_algorithm should be present for EC certificates"
)
public_key.verify(