Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 8, 2024
1 parent 543fb6e commit 5b3cb4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deepmd/dpmodel/fitting/polarizability_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,13 @@ def __setitem__(self, key, value):
self.constant_matrix = value
else:
super().__setitem__(key, value)

def __getitem__(self, key):
if key in ["constant_matrix"]:
return self.constant_matrix
else:
super().__getitem__(key, value)

def serialize(self) -> dict:
data = super().serialize()
data["type"] = "polar"
Expand Down
2 changes: 1 addition & 1 deletion deepmd/pt/model/task/polarizability.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def __setitem__(self, key, value):
self.constant_matrix = value
else:
super().__setitem__(key, value)

def __getitem__(self, key):
if key in ["constant_matrix"]:
return self.constant_matrix
Expand Down

0 comments on commit 5b3cb4a

Please sign in to comment.