-
-
Notifications
You must be signed in to change notification settings - Fork 19k
Zip Strict for pandas/plotting #62469 #62478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@Copilot
Copilot
AI
left a comment
There was a problem hiding this 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 usestrict=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.
Uh oh!
There was an error while loading. Please reload this page.
Keeping the zip strict policy just flexible enough that all the tests passes.
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.