Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deep copy of plutus data #225

Merged
merged 1 commit into from
Apr 24, 2023
Merged

Conversation

cffls
Copy link
Collaborator

@cffls cffls commented Apr 24, 2023

copy.deepcopy doesn't work natively for CBORTag, which is frequently used in PlutusData. This commit implements __deepcopy__ methods for PlutusData and RawPlutusData by serializing the object into cbor and deserializing them back to new objects.

copy.deepcopy doesn't work natively for CBORTag, which is frequently used in PlutusData.
This commit implements __deepcopy__ methods for PlutusData and RawPlutusData by serializing the object into cbor and deserializing them back to new objects.
@codecov-commenter
Copy link

Codecov Report

Merging #225 (cfaf7a3) into main (830090a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
+ Coverage   85.71%   85.73%   +0.01%     
==========================================
  Files          26       26              
  Lines        2919     2923       +4     
  Branches      701      701              
==========================================
+ Hits         2502     2506       +4     
  Misses        307      307              
  Partials      110      110              
Impacted Files Coverage Δ
pycardano/plutus.py 87.60% <100.00%> (+0.21%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@juliusfrost juliusfrost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests look good to me!

@cffls cffls merged commit da6da64 into Python-Cardano:main Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants