Skip to content

Conversation

@zorexsalvo
Copy link
Contributor

@zorexsalvo zorexsalvo commented Oct 26, 2025

@zorexsalvo zorexsalvo force-pushed the fix/rule_B905_tests-window branch 2 times, most recently from 654e2c2 to 20f9d14 Compare October 26, 2025 05:23
@zorexsalvo zorexsalvo force-pushed the fix/rule_B905_tests-window branch from 20f9d14 to b8a0fc9 Compare October 26, 2025 05:37
@zorexsalvo zorexsalvo marked this pull request as ready for review October 26, 2025 06:18
@zorexsalvo zorexsalvo force-pushed the fix/rule_B905_tests-window branch from 2270859 to 8dcd766 Compare October 28, 2025 08:32
@zorexsalvo zorexsalvo requested a review from mroeschke October 28, 2025 08:34
@zorexsalvo zorexsalvo force-pushed the fix/rule_B905_tests-window branch from 8dcd766 to a7be4e2 Compare October 28, 2025 08:46
DataFrame(values, index=df.loc[index, "C"]) for (values, index) in expected
]
for expected, actual in zip(expecteds, df.rolling(window, on="C")):
for expected, actual in zip(expecteds, df.rolling(window, on="C"), 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.

Why is this False?

Copy link
Contributor Author

@zorexsalvo zorexsalvo Oct 29, 2025

Choose a reason for hiding this comment

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

Hi @mroeschke some of the parametrize cases have mismatch lengths which when run with strict=True consistently raise test_iter_rolling_dataframe[None-expected7-2-None] - ValueError: zip() argument 2 is shorter than argument 1

One example is

(None, [({}, [])], 2, None),

None for the df means no valid rolling object, so no windows generated. But the expected side has one item.

Copy link
Member

Choose a reason for hiding this comment

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

I see. Thanks for highlighting.

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

Thanks @zorexsalvo

zhangbowen-coder pushed a commit to zhangbowen-coder/pandas that referenced this pull request Oct 30, 2025
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.

STY: Enforce Ruff rule B905, zip-without-explicit-strict

2 participants