mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 13:22:58 +00:00
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:
@@ -75,22 +75,22 @@ from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptogra
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
KeyFormat = t.Literal["SSH", "PKCS8", "PKCS1"]
|
||||
KeySerializationFormat = t.Literal["PEM", "DER", "SSH"]
|
||||
KeyType = t.Literal["rsa", "dsa", "ed25519", "ecdsa"]
|
||||
KeyFormat = t.Literal["SSH", "PKCS8", "PKCS1"] # pragma: no cover
|
||||
KeySerializationFormat = t.Literal["PEM", "DER", "SSH"] # pragma: no cover
|
||||
KeyType = t.Literal["rsa", "dsa", "ed25519", "ecdsa"] # pragma: no cover
|
||||
|
||||
PrivateKeyTypes = t.Union[
|
||||
rsa.RSAPrivateKey,
|
||||
dsa.DSAPrivateKey,
|
||||
ec.EllipticCurvePrivateKey,
|
||||
Ed25519PrivateKey,
|
||||
]
|
||||
] # pragma: no cover
|
||||
PublicKeyTypes = t.Union[
|
||||
rsa.RSAPublicKey, dsa.DSAPublicKey, ec.EllipticCurvePublicKey, Ed25519PublicKey
|
||||
]
|
||||
] # pragma: no cover
|
||||
|
||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||
PublicKeyTypes as AllPublicKeyTypes,
|
||||
PublicKeyTypes as AllPublicKeyTypes, # pragma: no cover
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user