Skip to content

Commit

Permalink
modified validate_input ()
Browse files Browse the repository at this point in the history
  • Loading branch information
Abodi-Massarwa committed Jul 22, 2024
1 parent c685be0 commit d06bb73
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1132,8 +1132,8 @@ def check_required_keys(required_keys):
bundles = kwargs['bundles']
if isinstance(bundles, dict):
for key, val in bundles.items():
if not isinstance(key, str) or not isinstance(val, list):
raise ValueError("Bundles not structured properly.")
if not isinstance(key, str) or not isinstance(val, (list,set)):
raise ValueError(f"Bundles not structured properly.{bundles} type(va;) -> {type(val)}")
if not callable(kwargs['val_func']):
raise ValueError("val_func must be callable.")
if not isinstance(kwargs['source'], str) or not isinstance(kwargs['target'], str):
Expand Down Expand Up @@ -1162,8 +1162,8 @@ def check_required_keys(required_keys):
bundles = kwargs['bundles']
if isinstance(bundles, dict):
for key, val in bundles.items():
if not isinstance(key, str) or not isinstance(val, list):
raise ValueError("Bundles not structured properly.")
if not isinstance(key, str) or not isinstance(val, (list,set)):
raise ValueError(f"Bundles not structured properly.{bundles} type(va;) -> {type(val)}")
if not callable(kwargs['valuation_func']):
raise ValueError("valuation_func must be callable.")
if not isinstance(kwargs['envy_graph'], nx.DiGraph):
Expand Down

0 comments on commit d06bb73

Please sign in to comment.