Skip to content

Commit 0c55379

Browse files
fix(typing): Using correct typing for param_hint
The typing of `param_hint` between `BadParameter`, `MissingParameter` and `_join_param_hints` was different. The firsts only allowed for a `str` where the later also accept a sequence of `str`. Fixes #2777
1 parent 91ac027 commit 0c55379

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/click/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __init__(
115115
message: str,
116116
ctx: Context | None = None,
117117
param: Parameter | None = None,
118-
param_hint: str | None = None,
118+
param_hint: cabc.Sequence[str] | str | None = None,
119119
) -> None:
120120
super().__init__(message, ctx)
121121
self.param = param
@@ -151,7 +151,7 @@ def __init__(
151151
message: str | None = None,
152152
ctx: Context | None = None,
153153
param: Parameter | None = None,
154-
param_hint: str | None = None,
154+
param_hint: cabc.Sequence[str] | str | None = None,
155155
param_type: str | None = None,
156156
) -> None:
157157
super().__init__(message or "", ctx, param, param_hint)

0 commit comments

Comments
 (0)