From 3d03cbd5a1511499ee2b0fb5bc6776d524c1ba68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Fri, 12 Dec 2025 18:27:45 -0600 Subject: [PATCH] Changed the type of the `target` key in the `Details` dictionary to represent an actual function --- CHANGELOG.md | 4 ++++ backoff/_typing.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d72ce9..503409e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixed + +- Changed the type of the `target` key in the `Details` dictionary to represent an actual function [#72](https://github.com/python-backoff/backoff/pull/72) (from [@edgarrmondragon](https://github.com/edgarrmondragon)) + ### Documentation - Switch to [Zensical for building the documentation](https://zensical.org/) [#62](https://github.com/python-backoff/backoff/pull/62) (from [@edgarrmondragon](https://github.com/edgarrmondragon)) diff --git a/backoff/_typing.py b/backoff/_typing.py index 99d2e9e..0e30e37 100644 --- a/backoff/_typing.py +++ b/backoff/_typing.py @@ -1,6 +1,7 @@ # coding:utf-8 import logging import sys +from types import FunctionType from typing import ( Any, Callable, @@ -27,7 +28,7 @@ def __init_subclass__(cls, **kwargs: Any) -> None: class _Details(TypedDict): - target: Callable[..., Any] + target: FunctionType args: Tuple[Any, ...] kwargs: Dict[str, Any] tries: int