Skip to content

Commit

Permalink
add __init__ method
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyminium committed Jan 21, 2025
1 parent c079cde commit 55ae7a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openff/evaluator/attributes/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ class AttributeClass(TypedBaseModel):
attributes with additional metadata.
"""

def __init__(self, **kwargs):
super().__init__()
for k, v in kwargs.items():
setattr(self, k, v)

def validate(self, attribute_type=None):
"""Validate the values of the attributes. If `attribute_type`
is set, only attributes of that type will be validated.
Expand Down

0 comments on commit 55ae7a6

Please sign in to comment.