Avoid deprecated typing.Callable. (#959)

This commit is contained in:
Felix Fontein
2025-10-17 08:48:27 +02:00
committed by GitHub
parent bd5f3b4c7c
commit 250230e763
15 changed files with 39 additions and 28 deletions

View File

@@ -10,6 +10,7 @@
from __future__ import annotations
import typing as t
from collections.abc import Callable
from ansible.module_utils.common.text.converters import to_bytes, to_text
@@ -131,7 +132,7 @@ def _is_cryptography_key_consistent(
*,
key_public_data: dict[str, t.Any],
key_private_data: dict[str, t.Any],
warn_func: t.Callable[[str], None] | None = None,
warn_func: Callable[[str], None] | None = None,
) -> bool | None:
if isinstance(key, cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey):
# key._backend was removed in cryptography 42.0.0