Skip to content

[click-web] Remove from pyrightconfig #14312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion pyrightconfig.stricter.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"stubs/boltons",
"stubs/braintree",
"stubs/cffi",
"stubs/click-web",
"stubs/click-web/resources/input_fields.pyi",
"stubs/dateparser",
"stubs/defusedxml",
"stubs/docker",
Expand Down
9 changes: 8 additions & 1 deletion stubs/click-web/click_web/resources/cmd_form.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
from typing import Any, TypedDict, type_check_only

import click

@type_check_only
class _FormData(TypedDict):
command: click.Command
fields: list[dict[str, Any]] # each item is result of resources.input_fields.get_input_field() function

def get_form_for(command_path: str) -> str: ...
def _get_commands_by_path(command_path: str) -> list[tuple[click.Context, click.Command]]: ...
def _generate_form_data(ctx_and_commands: list[tuple[click.Context, click.Command]]): ...
def _generate_form_data(ctx_and_commands: list[tuple[click.Context, click.Command]]) -> list[_FormData]: ...
def _process_help(help_text: bool) -> str: ...
6 changes: 3 additions & 3 deletions stubs/click-web/click_web/resources/input_fields.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class FieldId:
form_type: str,
name: str,
key: str | None = None,
): ...
) -> None: ...
@classmethod
def from_string(cls, field_info_as_string: str) -> FieldId: ...

Expand All @@ -44,7 +44,7 @@ class BaseInput:
@property
def type_attrs(self) -> dict[str, Any]: ...
def _to_cmd_line_name(self, name: str) -> str: ...
def _build_name(self, name: str): ...
def _build_name(self, name: str) -> str: ...

class ChoiceInput(BaseInput):
if sys.version_info >= (3, 10):
Expand Down Expand Up @@ -82,4 +82,4 @@ class DefaultInput(BaseInput):
INPUT_TYPES: Final[list[type[BaseInput]]]
_DEFAULT_INPUT: Final[list[type[DefaultInput]]]

def get_input_field(ctx: click.Context, param: click.Parameter, command_index, param_index) -> dict[str, Any]: ...
def get_input_field(ctx: click.Context, param: click.Parameter, command_index: int, param_index: int) -> dict[str, Any]: ...