diff --git a/src/click/core.py b/src/click/core.py index 3da80c321..8d9d99558 100644 --- a/src/click/core.py +++ b/src/click/core.py @@ -1600,7 +1600,7 @@ def function(__value, *args, **kwargs): # type: ignore return f(inner, *args, **kwargs) self._result_callback = rv = update_wrapper(t.cast(F, function), f) - return rv + return rv # type: ignore[return-value] return decorator diff --git a/src/click/decorators.py b/src/click/decorators.py index a1ec90628..c346c702a 100644 --- a/src/click/decorators.py +++ b/src/click/decorators.py @@ -93,7 +93,7 @@ def new_func(*args: "P.args", **kwargs: "P.kwargs") -> "R": return update_wrapper(new_func, f) - return decorator # type: ignore[return-value] + return decorator def pass_meta_key( @@ -126,7 +126,7 @@ def new_func(*args: "P.args", **kwargs: "P.kwargs") -> R: f"Decorator that passes {doc_description} as the first argument" " to the decorated function." ) - return decorator # type: ignore[return-value] + return decorator CmdType = t.TypeVar("CmdType", bound=Command)