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 recursion error by adding copy and deepcopy dunder methods #2973

Merged
merged 4 commits into from
May 5, 2023

Conversation

orionarcher
Copy link
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.

Copy link
Member

@janosh janosh left a comment

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