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 Oct 8, 2024
1 parent 622b58a commit 8f5b91c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions src/stpipe/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(

Check warning on line 517 in src/stpipe/step.py

View check run for this annotation

Codecov / codecov/patch

src/stpipe/step.py#L514-L517

Added lines #L514 - L517 were not covered by tests
"Could not record skip into DataModel"
" header: %s",
"Could not record skip into DataModel" " header: %s",
e,
)
step_result = args[0]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f5b91c

Please sign in to comment.