Skip to content

Commit

Permalink
Ensure RunType enum variants are case insensitive (#905)
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm authored Nov 27, 2023
1 parent 4921561 commit 6472cfd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions emmet-core/emmet/core/vasp/calc_types/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ class RunType(ValueEnum):
LDA = "LDA"
LDA_U = "LDA+U"

@classmethod
def _missing_(cls, value):
for member in cls:
if member.value.upper() == value.upper():
return member


class TaskType(ValueEnum):
"""VASP calculation task types."""
Expand Down

0 comments on commit 6472cfd

Please sign in to comment.