Skip to content

Commit

Permalink
fix(cli): fix zip for 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Rizhiy committed Mar 3, 2024
1 parent 8d1a119 commit 2cc190f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion replete/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def _pairs_to_dict_configured(items: Sequence[T] | None) -> dict[T, T]:
raise ValueError("Must have key-value pairs (even number)", {"items": items})
keys = [key_parse(key) for key in items[::2]]
values = [val_parse(val) for val in items[1::2]]
return dict(zip(keys, values, strict=True))
if len(keys) != len(values):
raise ValueError(f"Got unbalanced items: {len(keys)=} {len(values)=}")
return dict(zip(keys, values))

return _pairs_to_dict_configured

Expand Down

0 comments on commit 2cc190f

Please sign in to comment.