Skip to content

Conversation

@majiayu000
Copy link
Contributor

Summary

Add strict=True or strict=False to all zip() calls in pandas/tests/strings/ directory to comply with Ruff rule B905 (zip-without-explicit-strict).

Changes

File Changes
conftest.py Add strict=False for intentionally unequal length zip, strict=True for equal length unpack
test_api.py Add strict=True for equal length unpack
test_strings.py Add strict=True for equal length strings

Details

  • conftest.py line 97: Uses strict=False because the zip intentionally combines a list of ~27 methods with [()] * 100 and [{}] * 100 (unequal lengths by design)
  • conftest.py line 100: Uses strict=True because unpacking _any_string_method where each element is a 3-tuple
  • test_api.py line 24: Uses strict=True because unpacking _any_allowed_skipna_inferred_dtype where each element is a 2-tuple
  • test_strings.py line 760: Uses strict=True because zip("abc", "def") combines two equal-length strings

Partial fix for #62434

🤖 Generated with Claude Code

Add strict=True or strict=False to all zip() calls in pandas/tests/strings/ to comply with Ruff rule B905 (zip-without-explicit-strict). - conftest.py: Add strict=False for intentionally unequal length zip, strict=True for equal length unpack - test_api.py: Add strict=True for equal length unpack - test_strings.py: Add strict=True for equal length strings Partial fix for pandas-dev#62434 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant