Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
3 changes: 0 additions & 3 deletions src/oop_ext/foundation/callback/_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down