Skip to content

Commit de28bba

Browse files
make lint
1 parent df23983 commit de28bba

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

rocketserializer/components/stored_results.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ def __get_parameter(datapoints, data_labels, time_vector, label, position):
116116
return np.max(parameter[:, 1])
117117
elif position == "min":
118118
return np.min(parameter[:, 1])
119-
elif isinstance(position, (int, np.integer)):
119+
logger.error("Invalid position string parameter: %s", position)
120+
raise ValueError("Error in position parameter")
121+
if isinstance(position, (int, np.integer)):
120122
# Clamp position to valid range since NaN filtering may shrink the array
121123
clamped = min(position, len(parameter) - 1)
122124
if clamped != position:
@@ -127,8 +129,6 @@ def __get_parameter(datapoints, data_labels, time_vector, label, position):
127129
clamped,
128130
)
129131
return parameter[clamped, 1]
130-
else:
131-
logger.error(
132-
"Invalid position parameter: %s (type: %s)", position, type(position)
133-
)
134-
raise ValueError("Error in position parameter")
132+
133+
logger.error("Invalid position parameter: %s (type: %s)", position, type(position))
134+
raise ValueError("Error in position parameter")

tests/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
}
2626

2727

28-
def get_settings(ork_filepath, output_dir, ork_document):
29-
bs, _ = parse_ork_file(ork_filepath)
30-
output_dir.mkdir(parents=True, exist_ok=True)
28+
def get_settings(ork_path, output_path, ork_document):
29+
bs, _ = parse_ork_file(ork_path)
30+
output_path.mkdir(parents=True, exist_ok=True)
3131
settings = ork_extractor(
3232
bs=bs,
33-
filepath=str(ork_filepath),
34-
output_folder=str(output_dir),
33+
filepath=str(ork_path),
34+
output_folder=str(output_path),
3535
ork=ork_document,
3636
)
3737
return settings

0 commit comments

Comments
 (0)