Skip to content

Commit

Permalink
fix: check if more than one df attribute is passed
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Bernstorff <martinbernstorff@gmail.com>
  • Loading branch information
bokajgd and MartinBernstorff committed Dec 8, 2022
1 parent 266d20d commit f0f8623
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/timeseriesflattener/feature_spec_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,7 @@ def resolve_values_df(data: dict[str, Any]):
"Either values_loader or a dictionary containing dataframes or a single dataframe must be specified.",
)

if (
in_dict_and_not_none(d=data, key="values_loader")
and in_dict_and_not_none(d=data, key="values_df_dict")
and in_dict_and_not_none(
key="values_df",
d=data,
)
):
if sum(in_dict_and_not_none(data, key) for key in ["values_loader", "values_df_dict", "values_df"]) > 1:
raise ValueError(
"Only one of values_loader or values_df_dcict or df can be specified.",
)
Expand Down

0 comments on commit f0f8623

Please sign in to comment.