Review request: enable flake8-bugbear B007 repo-wide (PR #189319, tracking issue #106571)

Hi all,

I have a lint-enablement PR that has been merge-ready for ~3 weeks but can’t find a reviewer, likely because it crosses many module boundaries. Posting here as suggested escalation before considering splitting it up.

PR: Enable flake8-bugbear B007 (unused loop control variable) by HumphreySun98 · Pull Request #189319 · pytorch/pytorch · GitHub
What it does: enables flake8-bugbear B007 (unused loop control variable) from the long-standing tracking issue #106571 — removes it from the ruff ignore list in pyproject.toml and fixes all 169 violations across 106 files. Mostly mechanical _-prefix renames, with a handful of carefully audited edge cases (loop vars read after the loop, closures, a golden-string test that echoes source lines).

Current state:

  • Lint green; ruff check + ruff format --check clean with the CI-pinned ruff
  • A maintainer-run bot review (@jansel) raised two blocking findings — both fixed in follow-up commits
  • Rebased on main; B007 still clean repo-wide
  • Dr.CI classifies every remaining red job as unrelated (flaky / broken-trunk operator_benchmark / known-unstable pallas-tpu) and reports “you can merge normally”

The problem: 11 reviewers were auto-assigned because the diff touches inductor/dynamo/distributed/quantization/test dirs, and nobody has picked it up. Meanwhile the PR rots — it already went through one conflict cycle after ~840 commits landed on main, and any new B007 violation merged to main invalidates it.

Ask: could someone with lint/BE ownership take a look, or tell me who owns lint-enablement PRs these days? If a 106-file PR is fundamentally too wide to review, I’m happy to split it by directory — but I’d rather not do that churn if a single atomic review is acceptable, since only the last PR of a split can actually flip the rule on.

There are also a few first-time contributors on #106571 starting partial B007 cleanups that this PR already covers, so landing (or explicitly rejecting) it soon would help avoid duplicated work. I plan to continue with B017/B028 using the same pattern once this one lands.

Thanks!