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

lots of from_string should be classmethod #3177

Merged
merged 2 commits into from
Jul 22, 2023

Conversation

njzjz
Copy link
Contributor

@njzjz njzjz commented Jul 22, 2023

Summary

Fix a bug introduced in #3158. A lot of from_string methods should be classmethod.

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

@njzjz njzjz changed the title Incar.from_string should be classmethod lots of from_string should be classmethod Jul 22, 2023
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.

Oops! 😅 Thanks for catching this!

@janosh janosh merged commit d4c3cc5 into materialsproject:master Jul 22, 2023
29 checks passed
@janosh janosh added fix Bug fix PRs api Application programming interface labels Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Application programming interface fix Bug fix PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants