From 7841573439ed4eb19882162fcdb3ad52458dc0da 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 16:49:10 +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/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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b28207b..5dad849 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.19.1 + rev: v1.20.0 hooks: - id: mypy files: ^(src/) From 1c37d15d18359c54e41c6ea49bab58a4d4e2bed6 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 7 Apr 2026 08:35:55 -0300 Subject: [PATCH 2/2] Update _callback.py --- src/oop_ext/foundation/callback/_callback.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/oop_ext/foundation/callback/_callback.py b/src/oop_ext/foundation/callback/_callback.py index b7c0329..08fc16c 100644 --- a/src/oop_ext/foundation/callback/_callback.py +++ b/src/oop_ext/foundation/callback/_callback.py @@ -55,7 +55,6 @@ def on_x(x: int) -> None: from typing import Optional from typing import Tuple from typing import Union -from typing import cast import attr import functools @@ -189,7 +188,6 @@ def _GetKey( is garbage collected, a new function may end up having the same key. """ if func.__class__ == _CallbackWrapper: - func = cast(_CallbackWrapper, func) func = func.OriginalMethod() try: @@ -224,7 +222,6 @@ def _GetInfo( # at this point, but if it's a WeakMethodProxy, register the original method (we'll make a # weak reference later anyways). if func.__class__ == WeakMethodProxy: - func = cast(WeakMethodProxy, func) func = func.GetWrappedFunction() if _IsCallableObject(func):