Skip to content

lots of from_string should be classmethod - #3177

Merged
janosh merged 2 commits into
materialsproject:masterfrom
njzjz:patch-2
Jul 22, 2023
Merged

lots of from_string should be classmethod#3177
janosh merged 2 commits into
materialsproject:masterfrom
njzjz:patch-2

Conversation

@njzjz

@njzjz njzjz commented Jul 22, 2023

Copy link
Copy Markdown
Contributor

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

@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.

Oops! 😅 Thanks for catching this!

@janosh
janosh merged commit d4c3cc5 into materialsproject:master Jul 22, 2023
@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.

2 participants