Skip to content

Commit

Permalink
Add util to support lits of values
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Jun 4, 2024
1 parent 32ef7e6 commit c1269c9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions adijif/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ def get_jesd_mode_from_params(conv: converter, **kwargs: int) -> List[dict]:
for key, value in kwargs.items():
if key not in settings:
raise Exception(f"{key} not in JESD Configs")
if settings[key] == value:
found += 1
if isinstance(value, list):
for v in value:
if settings[key] == v:
found += 1
else:
if settings[key] == value:
found += 1
if found == needed:
results.append({"mode": mode, "jesd_mode": standard})

Expand Down

0 comments on commit c1269c9

Please sign in to comment.