fix mypy error

This commit is contained in:
Dulmandakh 2024-07-06 10:32:26 +08:00
parent e3613541c3
commit f2ac42d9e1

View File

@ -27,9 +27,9 @@ def deprecated(reason):
def decorator(func1):
if inspect.isclass(func1):
fmt1 = f"Call to deprecated class {func1.__name__} ({reason})."
fmt1 = f"Call to deprecated class {func1.__name__} ({reason!r})."
else:
fmt1 = f"Call to deprecated function {func1.__name__} ({reason})."
fmt1 = f"Call to deprecated function {func1.__name__} ({reason!r})."
@functools.wraps(func1)
def new_func1(*args, **kwargs):