diff --git a/src/click/decorators.py b/src/click/decorators.py index 46c5a6099..901f831ad 100644 --- a/src/click/decorators.py +++ b/src/click/decorators.py @@ -2,6 +2,7 @@ import inspect import typing as t +from collections import abc from functools import update_wrapper from gettext import gettext as _ @@ -531,7 +532,7 @@ class HelpOption(Option): def __init__( self, - param_decls: t.Optional[t.Sequence[str]] = None, + param_decls: abc.Sequence[str] | None = None, **kwargs: t.Any, ) -> None: if not param_decls: diff --git a/src/click/exceptions.py b/src/click/exceptions.py index 702515cf3..3bae1e762 100644 --- a/src/click/exceptions.py +++ b/src/click/exceptions.py @@ -33,7 +33,7 @@ def __init__(self, message: str) -> None: super().__init__(message) # The context will be removed by the time we print the message, so cache # the color settings here to be used later on (in `show`) - self.show_color: t.Optional[bool] = resolve_color_default() + self.show_color: bool | None = resolve_color_default() self.message = message def format_message(self) -> str: