diff --git a/src/stpipe/step.py b/src/stpipe/step.py index 6d641e2b..54333786 100644 --- a/src/stpipe/step.py +++ b/src/stpipe/step.py @@ -492,9 +492,11 @@ def run(self, *args): ) library.shelve(model, i) - elif (isinstance(args[0], Sequence)) and \ - (not isinstance(args[0], str)) and \ - (self.class_alias is not None): + elif ( + (isinstance(args[0], Sequence)) + and (not isinstance(args[0], str)) + and (self.class_alias is not None) + ): # handle ModelContainer or list of models if args[0] and isinstance(args[0][0], AbstractDataModel): for model in args[0]: @@ -509,12 +511,12 @@ 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", diff --git a/tests/test_step.py b/tests/test_step.py index c8e8b79f..88197e25 100644 --- a/tests/test_step.py +++ b/tests/test_step.py @@ -448,7 +448,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