zip
calls should ideally specify strict=True
since most of the time there's an underlying assumption that the input arguments are of equal length. To enforce this we should enable the Ruff rule zip-without-explicit-strict, https://docs.astral.sh/ruff/rules/zip-without-explicit-strict/
Since there are about ~500 occurrences of zip
in the code base, this issue should be completed in multiple PRs that adds strict=True
to zip
calls in a particular directory. Therefore, this issue can be worked on by multiple contributors.
For those interested in working on this issue:
- Comment below on which directory you'll be working on. If you want to work on
pandas/core
, please choose a subdirectory in this location e.g.pandas/core/internals
- Submit a PR adding
strict=True
(orstrict=False
if necessary) tozip
calls
Once all zip
calls are have a strict
argument, a separate PR will be needed to move "B905"
from the ignore section to the select section. https://github.com/pandas-dev/pandas/blob/98c9c7f838d223e66f1459fab23ac178b29c2227/pyproject.toml#L395
Comment From: LirongMa
Hello Matthew, I can work on pandas/io directory. Please assign this issue to me. Thank you.
Comment From: anthonyspeicher
Hey Matthew, I'll work on pandas/core/internals. Thanks!
Comment From: Alvaro-Kothe
Hi @mroeschke, I created a PR (#62446) that can help the verification of these fixes in CI.