Skip to content
Open
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 trogon/widgets/parameter_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def compose(self) -> ComposeResult:
# If there are N defaults, we render the "group" N times.
# Each group will contain `nargs` widgets.
with ControlGroupsContainer():
if not argument_type == click.BOOL:
if not isinstance(argument_type, click.types.BoolParamType):
yield Label(label, classes="command-form-label")

if isinstance(argument_type, click.Choice) and multiple:
Expand Down Expand Up @@ -325,7 +325,7 @@ def get_control_method(
)
if is_text_type:
return self.make_text_control
elif argument_type == click.BOOL:
elif isinstance(argument_type, click.types.BoolParamType):
return self.make_checkbox_control
elif isinstance(argument_type, click.types.Choice):
return partial(self.make_choice_control, choices=argument_type.choices)
Expand Down