Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stubs/click-web/click_web/resources/input_fields.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class FieldId:
class NotSupported(ValueError): ...

class BaseInput:
param_type_cls: type[click.types.ParamType] | None
param_type_cls: type[click.types.ParamType[Any]] | None
ctx: click.Context
param: click.Parameter
command_index: int
Expand Down Expand Up @@ -73,7 +73,7 @@ class TextAreaInput(BaseInput):
param_type_cls: type[TextAreaParamType]

class DefaultInput(BaseInput):
param_type_cls: type[click.ParamType]
param_type_cls: type[click.ParamType[Any]]

INPUT_TYPES: Final[list[type[BaseInput]]]
_DEFAULT_INPUT: Final[list[type[DefaultInput]]]
Expand Down
8 changes: 4 additions & 4 deletions stubs/click-web/click_web/web_click_types.pyi
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import re
from typing import ClassVar, TypeVar
from typing import Any, ClassVar, TypeVar

import click

_T = TypeVar("_T")

class EmailParamType(click.ParamType):
class EmailParamType(click.ParamType[str]):
EMAIL_REGEX: ClassVar[re.Pattern[str]]
def convert(self, value: str, param: click.Parameter | None, ctx: click.Context | None) -> str: ...

class PasswordParamType(click.ParamType):
class PasswordParamType(click.ParamType[Any]):
def convert(self, value: _T, param: click.Parameter | None, ctx: click.Context | None) -> _T: ...

class TextAreaParamType(click.ParamType):
class TextAreaParamType(click.ParamType[Any]):
def convert(self, value: _T, param: click.Parameter | None, ctx: click.Context | None) -> _T: ...

EMAIL_TYPE: EmailParamType
Expand Down
Loading