From e3914e83325511195fff185fd656a2054762e8a9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 06:26:08 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- deepmd_utils/model_format/output_def.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/deepmd_utils/model_format/output_def.py b/deepmd_utils/model_format/output_def.py index bcb35e6f42..25b7663f0f 100644 --- a/deepmd_utils/model_format/output_def.py +++ b/deepmd_utils/model_format/output_def.py @@ -38,7 +38,7 @@ def forward( **kwargs, ): ret = cls.forward(self, *args, **kwargs) - keys = self.md.keys_outp() if output_type == 'model' else self.md.keys() + keys = self.md.keys_outp() if output_type == "model" else self.md.keys() for kk in keys: dd = self.md[kk] check_var(ret[kk], dd) @@ -50,13 +50,16 @@ def forward( check_var(ret[dnr], self.md[dnr]) check_var(ret[dnc], self.md[dnc]) return ret + return wrapper + def model_check_output(cls): - return check_output(cls, 'model') + return check_output(cls, "model") + def fitting_check_output(cls): - return check_output(cls, 'fitting') + return check_output(cls, "fitting") class VariableDef: