From d2629bda1c6e3a12ba3175d12b08ba942886f962 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 22:26:49 +0000 Subject: [PATCH 1/5] ci(pre-commit.ci): autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/abravalheri/validate-pyproject: v0.24.1 → v0.25](https://github.com/abravalheri/validate-pyproject/compare/v0.24.1...v0.25) - [github.com/rhysd/actionlint: v1.7.10 → v1.7.12](https://github.com/rhysd/actionlint/compare/v1.7.10...v1.7.12) - [github.com/adhtruong/mirrors-typos: v1.41.0 → v1.45.0](https://github.com/adhtruong/mirrors-typos/compare/v1.41.0...v1.45.0) - [github.com/astral-sh/ruff-pre-commit: v0.14.10 → v0.15.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.10...v0.15.9) - [github.com/pre-commit/mirrors-mypy: v1.19.1 → v1.20.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.19.1...v1.20.0) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 278afd46..d089698b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,31 +7,31 @@ exclude: .asv repos: - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.24.1 + rev: v0.25 hooks: - id: validate-pyproject - repo: https://github.com/rhysd/actionlint - rev: v1.7.10 + rev: v1.7.12 hooks: - id: actionlint files: "^\\.github/workflows/.*\\.ya?ml$" - repo: https://github.com/adhtruong/mirrors-typos - rev: v1.41.0 + rev: v1.45.0 hooks: - id: typos args: [--force-exclude] # omitting --write-changes - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.9 hooks: - id: ruff-check args: [--fix, --unsafe-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.19.1 + rev: v1.20.0 hooks: - id: mypy exclude: tests|_throttler.pyi|_group.pyi From aa382a66f572656ac33f762c5303c789df0391d0 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Fri, 1 May 2026 17:10:26 -0700 Subject: [PATCH 2/5] update --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d089698b..c9931df1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,20 +18,20 @@ repos: files: "^\\.github/workflows/.*\\.ya?ml$" - repo: https://github.com/adhtruong/mirrors-typos - rev: v1.45.0 + rev: v1.46.0 hooks: - id: typos args: [--force-exclude] # omitting --write-changes - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.9 + rev: v0.15.12 hooks: - id: ruff-check args: [--fix, --unsafe-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.20.0 + rev: v1.20.2 hooks: - id: mypy exclude: tests|_throttler.pyi|_group.pyi From 8546afab775326dea4f94af7a764cf4bbcf0a10d Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Fri, 1 May 2026 17:17:48 -0700 Subject: [PATCH 3/5] fix typor --- tests/test_evented_decorator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_evented_decorator.py b/tests/test_evented_decorator.py index ca1f8fee..74c30103 100644 --- a/tests/test_evented_decorator.py +++ b/tests/test_evented_decorator.py @@ -266,7 +266,7 @@ class Foo: assert "all" in group and isinstance(group["all"], SignalInstance) assert not isinstance(group["all"], SignalRelay) - with pytest.raises(AttributeError): # it's not writeable + with pytest.raises(AttributeError): # it's not writable group.all = SignalRelay({}) # type: ignore assert group.psygnals_uniform() is False From b0c74ad62f0b426b5fa551d4a9edada0bf4e11d7 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Fri, 1 May 2026 17:18:24 -0700 Subject: [PATCH 4/5] remove cast --- src/psygnal/_signal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/psygnal/_signal.py b/src/psygnal/_signal.py index d4752aed..420e6826 100644 --- a/src/psygnal/_signal.py +++ b/src/psygnal/_signal.py @@ -827,7 +827,7 @@ def _remove_slot(self, slot: Literal["all"] | int | WeakCallback) -> None: elif isinstance(slot, int): self._slots.pop(slot) else: - self._slots.remove(cast("WeakCallback", slot)) + self._slots.remove(slot) def _try_discard(self, callback: WeakCallback, missing_ok: bool = True) -> None: """Try to discard a callback from the list of slots. From aac5bee0ab9b8f53ed7a2139365251e6f9a26336 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sat, 2 May 2026 15:40:36 -0700 Subject: [PATCH 5/5] fix: update mypy version to match pyproject.toml and cast slot removal in SignalInstance --- .pre-commit-config.yaml | 3 ++- src/psygnal/_signal.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c9931df1..4ca48656 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,8 @@ repos: - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.20.2 + # this must match the mypy version in pyproject.toml + rev: v1.19.1 hooks: - id: mypy exclude: tests|_throttler.pyi|_group.pyi diff --git a/src/psygnal/_signal.py b/src/psygnal/_signal.py index 420e6826..d4752aed 100644 --- a/src/psygnal/_signal.py +++ b/src/psygnal/_signal.py @@ -827,7 +827,7 @@ def _remove_slot(self, slot: Literal["all"] | int | WeakCallback) -> None: elif isinstance(slot, int): self._slots.pop(slot) else: - self._slots.remove(slot) + self._slots.remove(cast("WeakCallback", slot)) def _try_discard(self, callback: WeakCallback, missing_ok: bool = True) -> None: """Try to discard a callback from the list of slots.