Skip to content
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

[flake8-bugbear] itertools.batched() without explicit strict (B911) #14408

Merged
merged 6 commits into from
Dec 10, 2024

Conversation

InSyncWithFoo
Copy link
Contributor

Summary

Resolves #14387.

Test Plan

cargo nextest run and cargo insta test.

Copy link
Contributor

github-actions bot commented Nov 18, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@dhruvmanila dhruvmanila added rule Implementing or modifying a lint rule preview Related to preview mode features labels Nov 18, 2024
@MichaReiser
Copy link
Member

I think I prefer to wait with adding this rule and see if it gets accepted upstream to avoid having to re-code in a few days/weeks. See PyCQA/flake8-bugbear#498

@MichaReiser MichaReiser added the needs-decision Awaiting a decision from a maintainer label Nov 19, 2024
@InSyncWithFoo InSyncWithFoo deleted the RUF054 branch November 20, 2024 03:45
@InSyncWithFoo InSyncWithFoo restored the RUF054 branch November 20, 2024 12:28
@InSyncWithFoo InSyncWithFoo reopened this Nov 20, 2024
@MichaReiser MichaReiser removed the needs-decision Awaiting a decision from a maintainer label Dec 8, 2024
@InSyncWithFoo InSyncWithFoo changed the title [ruff] itertools.batched() without explicit strict (RUF054) [flake8-bugbear] itertools.batched() without explicit strict (B911) Dec 8, 2024
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

This is great.

We have to decide on the fix safety and polish the documentation a bit.

@MichaReiser
Copy link
Member

@AlexWaygood requesting review from you regarding the open question around fix safety (and whether we should raise a diagnostic). I already reviewed the code changes

@AlexWaygood AlexWaygood removed their request for review December 9, 2024 16:49
@MichaReiser MichaReiser enabled auto-merge (squash) December 10, 2024 08:35
@MichaReiser MichaReiser merged commit 4b8c815 into astral-sh:main Dec 10, 2024
20 checks passed
dcreager added a commit that referenced this pull request Dec 10, 2024
* main:
  [`airflow`] Add fix to remove deprecated keyword arguments (`AIR302`) (#14887)
  Improve mdtests style (#14884)
  Reference `suppress-dummy-regex-options` in documentation of rules supporting it (#14888)
  [`flake8-bugbear`] `itertools.batched()` without explicit `strict` (`B911`) (#14408)
  [`ruff`] Mark autofix for `RUF052` as always unsafe (#14824)
  [red-knot] Improve type inference for except handlers (#14838)
  More typos found by codespell (#14880)
  [red-knot] move standalone expression_ty to TypeInferenceBuilder::file_expression_ty (#14879)
  [`ruff`] Do not simplify `round()` calls (`RUF046`) (#14832)
  Stop referring to early ruff versions (#14862)
  Fix a typo in `class.rs` (#14877)
  [`flake8-pyi`] Also remove `self` and `cls`'s annotation (`PYI034`) (#14801)
  [`pyupgrade`] Remove unreachable code in `UP015` implementation (#14871)
  [`flake8-bugbear`] Skip `B028` if `warnings.warn` is called with `*args` or `**kwargs` (#14870)
@InSyncWithFoo InSyncWithFoo deleted the RUF054 branch December 11, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule proposal: require explicit strict= argument for itertools.batched
4 participants