Skip to content

Conversation

shivamvishal
Copy link
Contributor

@shivamvishal shivamvishal commented Sep 27, 2025

Keeping the zip strict policy just flexible enough that all the tests passes.

@Copilot Copilot AI review requested due to automatic review settings September 27, 2025 12:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the pandas plotting module by adding the strict=True parameter to zip() function calls to enforce equal-length iteration, addressing Python's B905 linting rule. The change ensures runtime errors if sequences of different lengths are zipped together, improving code robustness.

Key changes:

  • Updated all zip() calls in plotting modules to use strict=True
  • Removed B905 exceptions from pyproject.toml for plotting files
  • Applied changes across core plotting functionality including histograms, boxplots, and scatter plots

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml Removed B905 lint rule exceptions for plotting modules
pandas/plotting/_core.py Added strict=True to zip calls in plotting argument processing
pandas/plotting/_matplotlib/boxplot.py Added strict=True to zip calls in boxplot generation
pandas/plotting/_matplotlib/core.py Added strict=True to zip calls in core plotting functionality
pandas/plotting/_matplotlib/hist.py Added strict=True to zip calls in histogram plotting
pandas/plotting/_matplotlib/misc.py Added strict=True to zip calls in miscellaneous plotting functions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mroeschke mroeschke added the Visualization plotting label Sep 29, 2025
@mroeschke mroeschke added this to the 3.0 milestone Sep 29, 2025
@mroeschke mroeschke merged commit d18f9a2 into pandas-dev:main Sep 29, 2025
46 of 47 checks passed
@mroeschke
Copy link
Member

Thanks @shivamvishal

jzwick pushed a commit to jzwick/pandas that referenced this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants