@@ -2149,7 +2149,7 @@ class Parameter:
21492149 def __init__ (
21502150 self ,
21512151 param_decls : cabc .Sequence [str ] | None = None ,
2152- type : types .ParamType | t .Any | None = None ,
2152+ type : types .ParamType [ t . Any ] | t .Any | None = None ,
21532153 required : bool = False ,
21542154 # XXX The default historically embed two concepts:
21552155 # - the declaration of a Parameter object carrying the default (handy to
@@ -2181,7 +2181,7 @@ def __init__(
21812181 self .name , self .opts , self .secondary_opts = self ._parse_decls (
21822182 param_decls or (), expose_value
21832183 )
2184- self .type : types .ParamType = types .convert_type (type , default )
2184+ self .type : types .ParamType [ t . Any ] = types .convert_type (type , default )
21852185
21862186 # Default nargs to what the type tells us if we have that
21872187 # information available.
@@ -2648,7 +2648,7 @@ def shell_complete(self, ctx: Context, incomplete: str) -> list[CompletionItem]:
26482648 """Return a list of completions for the incomplete value. If a
26492649 ``shell_complete`` function was given during init, it is used.
26502650 Otherwise, the :attr:`type`
2651- :meth:`~click.types.ParamType.shell_complete` function is used.
2651+ :meth:`~click.types.ParamType[t.Any] .shell_complete` function is used.
26522652
26532653 :param ctx: Invocation context for this command.
26542654 :param incomplete: Value being completed. May be empty.
@@ -2749,7 +2749,7 @@ def __init__(
27492749 multiple : bool = False ,
27502750 count : bool = False ,
27512751 allow_from_autoenv : bool = True ,
2752- type : types .ParamType | t .Any | None = None ,
2752+ type : types .ParamType [ t . Any ] | t .Any | None = None ,
27532753 help : str | None = None ,
27542754 hidden : bool = False ,
27552755 show_choices : bool = True ,
@@ -2825,7 +2825,7 @@ def __init__(
28252825 if type is None :
28262826 # A flag without a flag_value is a boolean flag.
28272827 if flag_value is UNSET :
2828- self .type : types .ParamType = types .BoolParamType ()
2828+ self .type : types .ParamType [ t . Any ] = types .BoolParamType ()
28292829 # If the flag value is a boolean, use BoolParamType.
28302830 elif isinstance (flag_value , bool ):
28312831 self .type = types .BoolParamType ()
0 commit comments