Skip to content

[rejected AI] Add usage to command info dicts - #3864

Closed
pollychen-lab wants to merge 1 commit into
pallets:mainfrom
pollychen-lab:agent/info-dict-usage
Closed

[rejected AI] Add usage to command info dicts#3864
pollychen-lab wants to merge 1 commit into
pallets:mainfrom
pollychen-lab:agent/info-dict-usage

Conversation

@pollychen-lab

Copy link
Copy Markdown

Add a usage field to command info dictionaries using Command.get_usage(ctx), so documentation tooling consuming Context.to_info_dict() can include the generated usage line for root and nested commands.

fixes #2992

Validation:

  • uv run --locked pytest tests/test_info_dict.py -q --tb=short
  • uv run --locked pre-commit run --files src/click/core.py tests/test_info_dict.py CHANGES.md

@davidism davidism added the rejected AI Contribution rejected because of its untrustworthy AI origin label Sep 10, 2026
@davidism davidism changed the title Add usage to command info dicts [rejected AI] Add usage to command info dicts Sep 10, 2026
@davidism

Copy link
Copy Markdown
Member

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