Skip to content

AI junk - #3809

Closed
mikemikimike wants to merge 1 commit into
pallets:mainfrom
mikemikimike:fix/issue-2992-usage-info
Closed

AI junk#3809
mikemikimike wants to merge 1 commit into
pallets:mainfrom
mikemikimike:fix/issue-2992-usage-info

Conversation

@mikemikimike

Copy link
Copy Markdown

Fixes #2992.

Background

Command.to_info_dict() exposes command metadata for documentation tooling, but omits the usage string. Consumers must reconstruct the command context and call get_usage() themselves, which is especially difficult for nested command trees.

Changes

Include the context-specific result of get_usage(ctx) under the usage key for every command in to_info_dict() output. Existing metadata and command behavior remain unchanged.

Validation

  • PYTHONPATH=src python -m pytest -q --basetemp D:\\project\\tscodex\\github_pr\\tasks\\click-2992-basetemp — 1907 passed, 108 skipped, 1 xfailed.
  • ruff format --check src tests — passed.
  • ruff check src tests — passed.
  • git diff --check — passed.

@davidism

Copy link
Copy Markdown
Member

@davidism davidism changed the title Include command usage in info dictionaries AI junk Aug 29, 2026
@davidism davidism added the rejected AI Contribution rejected because of its untrustworthy AI origin label Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rejected AI Contribution rejected because of its untrustworthy AI origin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add output of get_usage() to get_info_dict()

2 participants