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
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ dependencies = [
"ansible-compat>=25.1.4",
"ansible-core>=2.15.0",
"click>=8.0,<9",
"click-help-colors>=0.9.4",
"enrich>=1.2.7",
"jinja2>=2.11.3",
"jsonschema>=4.9.1",
Expand Down Expand Up @@ -142,7 +141,6 @@ strict = true
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
"click_help_colors", # https://github.com/click-contrib/click-help-colors/issues/20
"testinfra.*", # https://github.com/pytest-dev/pytest-testinfra/issues/619
]

Expand Down
25 changes: 0 additions & 25 deletions src/molecule/click_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

import click

from click_help_colors import HelpColorsCommand, HelpColorsGroup

from molecule import util
from molecule.ansi_output import should_do_markup
from molecule.api import drivers
Expand Down Expand Up @@ -524,14 +522,6 @@ def __init__(self, *args: object, **kwargs: object) -> None:
self.help = first_line


class FirstLineHelpCommand(FirstLineHelpMixin, HelpColorsCommand):
"""Override the default help generation to remove the args section."""


class FirstLineHelpGroup(FirstLineHelpMixin, HelpColorsGroup):
"""Override the default help generation to remove the args section."""


def click_group_ex() -> ClickGroup:
"""Return extended version of click.group().

Expand All @@ -544,25 +534,13 @@ def click_group_ex() -> ClickGroup:
# blue : molecule own command, not dependent on scenario
# yellow : special commands, like full test sequence, or login
return click.group(
cls=FirstLineHelpGroup,
# Workaround to disable click help line truncation to ~80 chars
# https://github.com/pallets/click/issues/486
context_settings={
"max_content_width": 9999,
"color": should_do_markup(),
"help_option_names": ["-h", "--help"],
},
help_headers_color="yellow",
help_options_color="green",
help_options_custom_colors={
"drivers": "blue",
"init": "blue",
"list": "blue",
"matrix": "blue",
"login": "bright_yellow",
"reset": "blue",
"test": "bright_yellow",
},
)


Expand Down Expand Up @@ -605,10 +583,7 @@ def wrapper(*args: object, **kwargs: object) -> object:

# Apply the click.command decorator to the wrapper
return click.command(
cls=FirstLineHelpCommand,
name=name,
help_headers_color="yellow",
help_options_color="green",
)(wrapper)

return decorator
14 changes: 0 additions & 14 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.