Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #172 from jhlegarreta/RequireZipIterablesEqualLength2
Browse files Browse the repository at this point in the history
ENH: Require the iterables in a zip call to have equal length
  • Loading branch information
effigies authored Apr 17, 2024
2 parents b1f70cc + d8955fe commit 56fd8df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .maint/update_authors.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def read_md_table(md_text):
break

values = [v.strip() or None for v in line.split("|")][1:-1]
retval.append({k: v for k, v in zip(keys, values) if v})
retval.append({k: v for k, v in zip(keys, values, strict=True) if v})

return retval

Expand Down Expand Up @@ -288,7 +288,12 @@ def _aslist(value):
print("Authors (%d):" % len(hits))
print(
"%s."
% "; ".join(["%s \\ :sup:`%s`\\ " % (i["name"], idx) for i, idx in zip(hits, aff_indexes)])
% "; ".join(
[
"%s \\ :sup:`%s`\\ " % (i["name"], idx)
for i, idx in zip(hits, aff_indexes, strict=True)
]
)
)

print(
Expand Down

0 comments on commit 56fd8df

Please sign in to comment.