Skip to content

Conversation

krishna-datta
Copy link
Contributor

@krishna-datta krishna-datta commented Oct 1, 2025

@krishna-datta krishna-datta marked this pull request as ready for review October 10, 2025 17:02
new_codes = []

for lev, level_codes in zip(self.levels, self.codes):
for lev, level_codes in zip(self.levels, self.codes, strict=False):
Copy link
Member

Choose a reason for hiding this comment

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

What fails when this is True?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

None of the tests are failing for any of the cases flagged. I originally set this to False, but after some more digging, and I see the MultiIndex constructor enforces the same length for the levels and codes. Setting these to True


changed = False
for lev, level_codes in zip(self.levels, self.codes):
for lev, level_codes in zip(self.levels, self.codes, strict=False):
Copy link
Member

Choose a reason for hiding this comment

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

What fails when this is True?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above


retval = []
for lev, level_codes in zip(self.levels, self.codes):
for lev, level_codes in zip(self.levels, self.codes, strict=False):
Copy link
Member

Choose a reason for hiding this comment

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

What fails when this is True?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above

@mroeschke mroeschke added the Code Style Code style, linting, code_checks label Oct 13, 2025
@mroeschke mroeschke added this to the 3.0 milestone Oct 13, 2025
@mroeschke mroeschke merged commit 56a85b2 into pandas-dev:main Oct 13, 2025
47 checks passed
@mroeschke
Copy link
Member

Thanks @krishna-datta

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