From e83d436882a3bbba075ef29b6218a7492239f92e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 19:13:46 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.8 → v0.16.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.8...v0.16.0) - [github.com/crate-ci/typos: v1.40.0 → v1](https://github.com/crate-ci/typos/compare/v1.40.0...v1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 99d44b14e..59f683f0a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.8 + rev: v0.16.0 hooks: - id: ruff args: [--fix] - id: ruff-format - repo: https://github.com/crate-ci/typos - rev: v1.40.0 + rev: v1 hooks: - id: typos From 350f535ad0a40cbbe548f265ef6d3e74b26d3b5b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 19:13:55 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- packages/hmr/reactivity/_typing_utils.py | 2 +- packages/hmr/reactivity/async_primitives.py | 2 +- packages/hmr/reactivity/collections.py | 6 ++---- tests/py/utils/trio.py | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/hmr/reactivity/_typing_utils.py b/packages/hmr/reactivity/_typing_utils.py index 0fc98c7a0..e73bc9098 100644 --- a/packages/hmr/reactivity/_typing_utils.py +++ b/packages/hmr/reactivity/_typing_utils.py @@ -3,4 +3,4 @@ if TYPE_CHECKING: from typing_extensions import deprecated # noqa: UP035 else: - deprecated = lambda _: lambda _: _ # noqa: E731 + deprecated = lambda _: lambda _: _ diff --git a/packages/hmr/reactivity/async_primitives.py b/packages/hmr/reactivity/async_primitives.py index aa1c99299..e01b473c8 100644 --- a/packages/hmr/reactivity/async_primitives.py +++ b/packages/hmr/reactivity/async_primitives.py @@ -50,7 +50,7 @@ def __await__(self): yield from evt.wait().__await__() if exc is not None: raise exc - return res # noqa: F821 + return res return Future() diff --git a/packages/hmr/reactivity/collections.py b/packages/hmr/reactivity/collections.py index c0825db3d..9816e4777 100644 --- a/packages/hmr/reactivity/collections.py +++ b/packages/hmr/reactivity/collections.py @@ -274,10 +274,8 @@ def __delitem__(self, key): def insert(self, index, value): if index < 0: index += self._length - if index < 0: - index = 0 - if index > self._length: - index = self._length + index = max(index, 0) + index = min(index, self._length) self._replace(slice(index, index), [value]) def append(self, value): diff --git a/tests/py/utils/trio.py b/tests/py/utils/trio.py index 6da26f78c..5ecd0b560 100644 --- a/tests/py/utils/trio.py +++ b/tests/py/utils/trio.py @@ -62,7 +62,7 @@ def __await__(self): yield from evt.wait().__await__() if exc is not None: raise exc - return res # noqa: F821 + return res return Future()