Skip to content

Commit a456097

Browse files
committed
fix(spp_user_roles): pass strict=True to zip() in create override
CI's ruff (B905) flagged `zip(new_records, groups_vals_list)` for omitting the explicit `strict=` parameter. The two iterables are built side-by-side in the same loop above the call, so they're guaranteed equal length — make it explicit with `strict=True` to satisfy the linter and turn an undetectable mismatch into a clear runtime error if the invariant ever breaks.
1 parent 1b5d3aa commit a456097

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spp_user_roles/models/role.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def create(self, vals_list):
2929

3030
new_records = super().create(vals_list)
3131

32-
for record, group_vals in zip(new_records, groups_vals_list):
32+
for record, group_vals in zip(new_records, groups_vals_list, strict=True):
3333
if group_vals:
3434
record.group_id.write(group_vals)
3535

0 commit comments

Comments
 (0)