Skip to content

Commit 539ef7b

Browse files
committed
fix MegaLinter errors (x2)
1 parent c6080b1 commit 539ef7b

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

PWGHF/D2H/Macros/cut_variation.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,18 @@ def __init__( # pylint: disable=too-many-arguments
5353
unc_eff_prompt=None,
5454
unc_eff_nonprompt=None,
5555
):
56-
inputs = (
57-
raw_yields,
58-
eff_prompt,
59-
eff_nonprompt,
60-
unc_raw_yields,
61-
unc_eff_prompt,
62-
unc_eff_nonprompt,
63-
)
64-
65-
if all(value is None for value in inputs):
56+
if raw_yields is None:
6657
raw_yields = np.zeros(0)
58+
if eff_prompt is None:
6759
eff_prompt = np.zeros(0)
60+
if eff_nonprompt is None:
6861
eff_nonprompt = np.zeros(0)
62+
if unc_raw_yields is None:
6963
unc_raw_yields = np.zeros(0)
64+
if unc_eff_prompt is None:
7065
unc_eff_prompt = np.zeros(0)
66+
if unc_eff_nonprompt is None:
7167
unc_eff_nonprompt = np.zeros(0)
72-
elif any(value is None for value in inputs):
73-
raise ValueError("Either all input arrays or none must be provided.")
7468

7569
self.raw_yields = raw_yields
7670
self.eff_prompt = eff_prompt

0 commit comments

Comments
 (0)