From 7ee6b6612641bd40064b0aa1c01450916b018416 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Nov 2024 00:43:22 -0700 Subject: [PATCH] Revert incorrect typing changes. --- src/click/decorators.py | 2 +- src/click/exceptions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/click/decorators.py b/src/click/decorators.py index e2c8fba05..46c5a6099 100644 --- a/src/click/decorators.py +++ b/src/click/decorators.py @@ -531,7 +531,7 @@ class HelpOption(Option): def __init__( self, - param_decls: t.Optional | t.Sequence[str] = None, + param_decls: t.Optional[t.Sequence[str]] = None, **kwargs: t.Any, ) -> None: if not param_decls: diff --git a/src/click/exceptions.py b/src/click/exceptions.py index 30f064449..702515cf3 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: t.Optional[bool] = resolve_color_default() self.message = message def format_message(self) -> str: