diff --git a/src/click/core.py b/src/click/core.py index 0b8a2e658..869892a2a 100644 --- a/src/click/core.py +++ b/src/click/core.py @@ -1026,14 +1026,14 @@ def get_help_option(self, ctx: Context) -> Option | None: # Avoid circular import. from .decorators import help_option - def dummy_func(): + def dummy_func() -> None: pass # Call @help_option decorator to produce an help option with proper # defaults and attach it to the dummy function defined above. help_option(*help_option_names)(dummy_func) - return dummy_func.__click_params__.pop() + return dummy_func.__click_params__.pop() # type: ignore[no-any-return, attr-defined] def make_parser(self, ctx: Context) -> _OptionParser: """Creates the underlying option parser for this command."""