Skip to content

[pre-commit.ci] pre-commit autoupdate - #714

Merged
RonnyPfannschmidt merged 14 commits into
mainfrom
pre-commit-ci-update-config
Aug 12, 2026
Merged

[pre-commit.ci] pre-commit autoupdate#714
RonnyPfannschmidt merged 14 commits into
mainfrom
pre-commit-ci-update-config

Conversation

@pre-commit-ci

@pre-commit-ci pre-commit-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from 3ef64d8 to fdef824 Compare August 3, 2026 21:33
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from 0e34408 to 1690f86 Compare August 10, 2026 21:33
@Pierre-Sassoulas Pierre-Sassoulas added enhancement dependencies Pull requests that update a dependency file labels Aug 11, 2026
@Pierre-Sassoulas
Pierre-Sassoulas force-pushed the pre-commit-ci-update-config branch 2 times, most recently from 9b13013 to eb7ee84 Compare August 12, 2026 05:42
pre-commit-ci Bot and others added 13 commits August 12, 2026 07:44
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.15.22 → v0.16.2](astral-sh/ruff-pre-commit@v0.15.22...v0.16.2)
Fixes the flake8-comprehensions C408 violations that ruff 0.16 reports
now that it enables the rule by default.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
``0 / 0`` as a statement is a deliberate "blow up here", and
``module.x.broken`` a deliberate attribute access, but both read as
dead code, which is what flake8-bugbear B018 (enabled by default as of
ruff 0.16) reports. Say what is meant instead: raise the error, and
assign the attribute access that is only there for its side effect.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ruff 0.16 enables flake8-simplify by default:

* SIM102 in ``varnames()`` and in a test plugin manager: flatten a
  nested ``if`` into the branch condition.
* SIM103 in the Sphinx warning filter: return the negated condition
  instead of branching to two literals.
* SIM118 in ``HookCaller._verify_all_args_are_provided()``: membership
  on the mapping itself, no ``.keys()`` needed.

Also parenthesizes the ``or``/``and`` condition ruff collapsed in the
previous commit, which relied on operator precedence to be read right.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
``from collections.abc import Set`` shadows the reading of the ``set``
builtin at a glance, which is what flake8-pyi PYI025 (default as of ruff
0.16) points out. Alias it to ``AbstractSet``.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The hookimpl loop in ``PluginManager.register()`` reused ``name``, the
method's own argument, for two different things: the attribute name
being inspected on the plugin, and then the hook name it maps to. Give
each its own name, as PLR1704 (default as of ruff 0.16) asks.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PERF402, enabled by default as of ruff 0.16.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
``varnames()`` and its benchmark counterpart fetch ``__call__`` to
inspect the signature of a callable object. B004 (default as of ruff
0.16) reads that as an unreliable callable test and suggests
``callable()``, which returns a bool and would break both. Mark it, and
say why in the code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
``test_dist_facade_identity_equality_and_hash`` asserts that a facade
equals itself, which is exactly the identity semantics under test.
PLR0124 (default as of ruff 0.16) flags the self-comparison.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The multicall engine and ``Result.from_call()`` must capture whatever a
hook implementation raised -- BaseException included -- and hand it to
the hook wrappers; narrowing those handlers would change pluggy's
contract. ``varnames()`` and ``parse_hookimpl_opts()`` likewise read
attributes off arbitrary plugin objects, which may raise anything (see
``test_plugin_getattr_raises_errors``). flake8-blind-except is enabled
by default as of ruff 0.16 and flags all thirteen sites.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
``test_wrapper_exception_chaining`` and ``test_plugin_getattr_raises_errors``
raise plain ``Exception`` deliberately: the point is that pluggy carries
and chains exception types it knows nothing about. tryceratops is enabled
by default as of ruff 0.16.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ruff already selects E, W and F, and ruff format owns line length, so
flake8 only duplicated it -- and the two now disagree: ruff 0.16 enables
RUF100, which removed the ``# noqa: E501`` on the documentation URL in
``_warn_teardown_exception()`` because ruff's own E501 does not flag a
line that has nothing left to wrap, while flake8's E501 still does. The
URL is 93 characters, so no indentation fits it under 99 either.

The only hook-specific check lost is flake8-typing-imports, which warns
about typing features newer than the minimum Python. pluggy requires
3.10, ruff infers the same target version from ``requires-python``, and
mypy runs on every commit, so it had nothing left to catch.

This also unpins pre-commit-hooks, which dropped its flake8 hook in
v3.0.0 and could not be autoupdated past v2.1.0 while it was in use.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Pierre-Sassoulas
Pierre-Sassoulas force-pushed the pre-commit-ci-update-config branch from eb7ee84 to 9564b0a Compare August 12, 2026 05:45
@Pierre-Sassoulas

Copy link
Copy Markdown
Member

@RonnyPfannschmidt I think the part that need review is this: 9564b0a (dropping flake8 for ruff)

The previous commit claimed mypy already covered what
flake8-typing-imports checked. That was only half true: ``[tool.mypy]``
set no ``python_version``, so mypy checked against whichever interpreter
the hook happened to run on -- 3.14 in the pre-commit environment -- and
a ``typing`` member added after 3.10 passed unnoticed.

Pin it to 3.10, matching ``requires-python``. mypy then reads typeshed's
``sys.version_info`` guards and reports, for instance, ``Module
"typing" has no attribute "Self"``, which is what TYP001 used to catch.
It covers more than the plugin did, too: every guarded stdlib attribute
rather than only ``typing`` imports, and uses as well as import lines.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@RonnyPfannschmidt
RonnyPfannschmidt merged commit 09baae8 into main Aug 12, 2026
19 checks passed
@RonnyPfannschmidt
RonnyPfannschmidt deleted the pre-commit-ci-update-config branch August 12, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants