From 8f5b91c330daf01dd48fbbb381f64a4e27a3e8db Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:40:23 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/stpipe/step.py | 13 ++++++------- tests/test_step.py | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/stpipe/step.py b/src/stpipe/step.py index 683cf55b..67e383cb 100644 --- a/src/stpipe/step.py +++ b/src/stpipe/step.py @@ -507,16 +507,15 @@ def run(self, *args): e, ) - elif isinstance(args[0], AbstractDataModel) and \ - self.class_alias is not None: + elif ( + isinstance(args[0], AbstractDataModel) + and self.class_alias is not None + ): try: - args[0][ - f"meta.cal_step.{self.class_alias}" - ] = "SKIPPED" + args[0][f"meta.cal_step.{self.class_alias}"] = "SKIPPED" except AttributeError as e: self.log.info( - "Could not record skip into DataModel" - " header: %s", + "Could not record skip into DataModel" " header: %s", e, ) step_result = args[0] diff --git a/tests/test_step.py b/tests/test_step.py index 9693698b..5997af58 100644 --- a/tests/test_step.py +++ b/tests/test_step.py @@ -444,7 +444,7 @@ def get_crds_parameters(self): def save(self, path, dir_path=None, *args, **kwargs): saveid = getattr(self, "saveid", None) if saveid is not None: - fname = saveid+"-saved.txt" + fname = saveid + "-saved.txt" with open(fname, "w") as f: f.write(f"{path}") return fname