Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/shapepipe/modules/mask_package/mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ def _exec_WW(self, types="HALO"):
self._WW_stdout, self._WW_stderr = execute(cmd)

else:
ValueError("Types must be in ['HALO','SPIKE','ALL']")
raise ValueError("Types must be in ['HALO','SPIKE','ALL']")

if (self._WW_stderr != "") or (self._rm_reg_stderr != ""):
self._err = True
Expand Down
4 changes: 2 additions & 2 deletions src/shapepipe/modules/mccd_interp_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ def mccd_interp_runner(
inst.process_me(psf_model_dir, psf_model_pattern, f_wcs_path)

elif mode == "VALIDATION":
ValueError(
raise ValueError(
"MODE has to be in MULTI-EPOCH or CLASSIC. For validation"
+ " use MCCD validation runner."
)

else:
ValueError("MODE has to be in : [CLASSIC, MULTI-EPOCH]")
raise ValueError("MODE has to be in : [CLASSIC, MULTI-EPOCH]")

# No return objects
return None, None
2 changes: 1 addition & 1 deletion src/shapepipe/modules/psfex_interp_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def psfex_interp_runner(

else:
# Raise error for invalid run mode
ValueError("MODE has to be in : [CLASSIC, MULTI-EPOCH, VALIDATION]")
raise ValueError("MODE has to be in : [CLASSIC, MULTI-EPOCH, VALIDATION]")

# No return objects
return None, None
2 changes: 1 addition & 1 deletion src/shapepipe/pipeline/file_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ def _generate_re_pattern(match_pattern):

"""
if not isinstance(match_pattern, str):
TypeError("Match pattern must be a string.")
raise TypeError("Match pattern must be a string.")

chars = [char for char in match_pattern if not char.isalnum()]
split_pattern = "|".join(chars).replace(".", r"\.")
Expand Down
2 changes: 1 addition & 1 deletion src/shapepipe/pipeline/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ def add_col(
)

if type(col_data) != np.ndarray:
TypeError("col_data must be a numpy.ndarray")
raise TypeError("col_data must be a numpy.ndarray")

if hdu_no is None:
hdu_no = self.hdu_no
Expand Down