From 1d8f1fe32c56e019542ab8e8635fe29cefebc61a Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 19 Sep 2024 17:27:33 +0300 Subject: [PATCH] Fix deprecation message Missing f-string. --- src/uharfbuzz/_harfbuzz.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uharfbuzz/_harfbuzz.pyx b/src/uharfbuzz/_harfbuzz.pyx index 6fc5759..3e89d85 100644 --- a/src/uharfbuzz/_harfbuzz.pyx +++ b/src/uharfbuzz/_harfbuzz.pyx @@ -47,15 +47,15 @@ def version_string() -> str: WARNED = set() -def deprecated(alternate=None): +def deprecated(replacement=None): """Decorator to raise a warning when a deprecated function is called.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): message = f"{func.__name__!r} is deprecated" - if alternate: - message += ", use {alternate} instead" + if replacement: + message += f", use {replacement} instead" if message not in WARNED: warnings.warn(message, DeprecationWarning, stacklevel=2) WARNED.add(message)