chore(deps): update ruff requirement from ==0.15.* to ==0.16.* - #1304
dependabot[bot] wants to merge 2 commits into
Conversation
8162393 to
430867c
Compare
430867c to
6ac9476
Compare
Updates the requirements on [ruff](https://github.com/astral-sh/ruff) to permit the latest version. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.15.0...0.16.0) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
6ac9476 to
860cebf
Compare
| mypy == 2.3.*; python_version > "3.9" | ||
| mypy == 1.19.*; python_version <= "3.9" | ||
| ruff == 0.15.* | ||
| ruff == 0.16.* |
There was a problem hiding this comment.
This bump makes hatch run lint fail.
The "Run Linting" step failed on this head SHA (Python (macos-latest, 3.11); the rest of the matrix was cancelled after the first failure). The base commit ec233d6 passed lint on every matrix job, so the ruff pin is the cause, not a pre-existing break.
With the resolved version (ruff 0.16.7), ruff check . reports:
Found 1856 errors.
[*] 400 fixable with the `--fix` option (1060 hidden fixes can be enabled with the `--unsafe-fixes` option).
The violations come from rule families this repo never selected. [tool.ruff.lint] only sets extend-select = ["RUF022", "E402", "TID251"] / ignore = ["E501"], so the effective set should be ruff's defaults (E4, E7, E9, F). Instead the top offenders are:
| count | rule |
|---|---|
| 373 | UP045 |
| 322 | UP006 |
| 119 | UP035 |
| 95 | BLE001 |
| 46 | RUF012 |
| 41 | SIM117 |
| 35 | DTZ001 |
| 20 | RUF100 |
None of UP*, BLE*, SIM*, DTZ* are in the default set, which points at 0.16 resolving a much broader select under the same config rather than 1856 genuine new defects. Worth establishing what changed about default rule selection before landing this.
Two things that would make the bump safe:
- Pin an explicit
selectin[tool.ruff.lint]so the enabled set no longer depends on whatever ruff ships as its default — the same defensive reasoning the existing comment atpyproject.toml:131-133already applies toE402. - Be careful with
--fixas a shortcut here: the 20RUF100(unusednoqa) hits mean existing suppressions are being judged against the new rule set, so an automated fix pass would stripnoqacomments that are still load-bearing under the intended config.
Rebasing might not happen immediately, so don't worry if this takes some time.
Note: if you make any changes to this PR yourself, they will take precedence over the rebase.
Updates the requirements on ruff to permit the latest version.
Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
a2635fdBump 0.16.0 (#27136)3433449[ty] Reuse full call diagnostics for implicit setter calls (#27115)2240070Reflectruff: ignoreand--add-ignorestabilization in documentation (#27...17ef711Stabilize--add-ignore(#27125)ef912bbAdd newly stabilized rules to defaults (#27055)b30f040Stabilize new default rules (#27035)bcd70c5Exclude Markdown files fromformat-devruns (#27052)87e51e2Fixformat --checkspans for syntax errors (#27045)afe2723[flake8-gettext] Stabilize qualified-name and built-in binding resolution (...a9702d8[flake8-bandit] Stabilize string literal binding resolution (S310) (#26944)