Skip to content

Conversation

shivamvishal
Copy link
Contributor

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@Copilot Copilot AI review requested due to automatic review settings October 1, 2025 22:56
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 updates zip() calls throughout pandas/util and pandas/_libs to explicitly specify the strict parameter, enhancing code clarity and safety by making the intended behavior explicit regarding mismatched iterator lengths.

  • Adds strict=False to cases where mismatched lengths are intentionally allowed
  • Adds strict=True to cases where iterators are expected to have equal lengths
  • Updates both Python (.py) and Cython (.pyx) files across utility and core library modules

Reviewed Changes

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

Show a summary per file
File Description
pandas/util/_validators.py Added strict=False to validation functions where argument length mismatches are handled
pandas/util/_doctools.py Added strict=True to plotting functions expecting paired data
pandas/_libs/tslibs/timezones.pyx Added strict=True for timezone transition list processing
pandas/_libs/tslibs/offsets.pyx Mixed usage: strict=True for paired data, strict=False for frequency parsing
pandas/_libs/tslibs/fields.pyx Added strict=True for datetime field processing
pandas/_libs/missing.pyx Added strict=True for tuple equality checking
pandas/_libs/index.pyx Added strict=True for multi-index level processing

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

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Oct 2, 2025
@mroeschke mroeschke added this to the 3.0 milestone Oct 2, 2025
@mroeschke mroeschke added Code Style Code style, linting, code_checks and removed Testing pandas testing functions or related to the test suite labels Oct 2, 2025
@mroeschke mroeschke merged commit 8acec7a into pandas-dev:main Oct 2, 2025
35 of 54 checks passed
@mroeschke
Copy link
Member

Thanks @shivamvishal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants