Skip to content

fix recursion error by adding copy and deepcopy dunder methods - #2973

Merged
janosh merged 4 commits into
materialsproject:masterfrom
orionarcher:input_set_fix
May 5, 2023
Merged

fix recursion error by adding copy and deepcopy dunder methods#2973
janosh merged 4 commits into
materialsproject:masterfrom
orionarcher:input_set_fix

Conversation

@orionarcher

Copy link
Copy Markdown
Contributor

Summary

Both copy and deepcopy are currently broken for the InputSet object. This PR implements dunder methods to fix both. There very well may be a more elegant solution but I couldn't find it!

  • Feature 1: __copy__ and __deepcopy__ dunder methods

Checklist

  • Doc strings have been added in the Google docstring format. Run pydocstyle on your code.
  • Type annotations are highly encouraged. Run mypy path/to/file.py to type check your code.
  • Tests have been added for any new functionality or bug fixes.
  • All linting and tests pass.

@janosh janosh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the fix @orionarcher! 👍

@janosh
janosh enabled auto-merge (squash) May 5, 2023 18:17
@janosh janosh added the fix Bug fix PRs label May 5, 2023
@janosh
janosh merged commit 9c7d2bb into materialsproject:master May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants