Skip to content

Commit 8e50c45

Browse files
author
Nicola Camillucci
committed
Added __deepcopy__
1 parent 72e7930 commit 8e50c45

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

  • sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto

sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_models.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,16 @@ def __copy__(self) -> KeyVaultRSAPublicKey:
318318
"""
319319
return self
320320

321+
def __deepcopy__(self, memo: dict) -> KeyVaultRSAPublicKey:
322+
"""Returns this instance since it is treated as immutable.
323+
324+
:param dict memo: Memo dictionary used by `copy.deepcopy`.
325+
326+
:returns: This instance.
327+
:rtype: ~azure.keyvault.keys.crypto.KeyVaultRSAPublicKey
328+
"""
329+
return self
330+
321331
def verifier( # pylint:disable=docstring-missing-param,docstring-missing-return,docstring-missing-rtype
322332
self, signature: bytes, padding: AsymmetricPadding, algorithm: HashAlgorithm
323333
) -> NoReturn:
@@ -500,6 +510,16 @@ def __copy__(self) -> KeyVaultRSAPrivateKey:
500510
"""
501511
return self
502512

513+
def __deepcopy__(self, memo: dict) -> KeyVaultRSAPrivateKey:
514+
"""Returns this instance since it is treated as immutable.
515+
516+
:param dict memo: Memo dictionary used by `copy.deepcopy`.
517+
518+
:returns: This instance.
519+
:rtype: ~azure.keyvault.keys.crypto.KeyVaultRSAPrivateKey
520+
"""
521+
return self
522+
503523

504524
class DecryptResult:
505525
"""The result of a decrypt operation.

0 commit comments

Comments
 (0)