Skip to content

Commit 9101bef

Browse files
authored
Use isinstance instead of checking type equality (#1459)
1 parent 8fffe20 commit 9101bef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tlo/analysis/utils.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@ def generate_series(dataframe: pd.DataFrame) -> pd.Series:
290290
try:
291291
df: pd.DataFrame = load_pickled_dataframes(results_folder, draw, run, module)[module][key]
292292
output_from_eval: pd.Series = generate_series(df)
293-
assert pd.Series == type(output_from_eval), 'Custom command does not generate a pd.Series'
293+
assert isinstance(output_from_eval, pd.Series), (
294+
'Custom command does not generate a pd.Series'
295+
)
294296
if do_scaling:
295297
res[draw_run] = output_from_eval * get_multiplier(draw, run)
296298
else:

0 commit comments

Comments
 (0)