← Back to issue list

docs: fix parameter names showing as None in CLI usage docs

View original Github issue

Metadata

Project
charmcraft
Number
#2671
Type
pull request
State
open
Author
Copilot
Labels
—
Created
Updated
Closed
—

Current evaluation

Fixes gen_cli_docs.py so required-argument metavars no longer render as <None> in CLI usage docs, falling back to argparse conventions (dest for positional, dest.upper() for optional). Approved, awaiting merge.

Suggested action: needs review

Reason: PR is approved with 0 unresolved review comments and all relevant CI checks passing; the failing checks (snap-tests on various Ubuntu versions, snap-store-tests, OSV-scanner) are documented in the PR body as unrelated infrastructure/upstream issues. It fixes two open issues (#2578, #2642) with a small, focused +10/-1 change.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 24 Complexity: 15 Confidence: 82 Actionability: 80

Issue body

- [x] Investigated CI failures on main and open PRs - [x] Found and fixed bug in `tools/docs/gen_cli_docs.py`: required argument metavars show as `<None>` in usage strings when `metavar` is not explicitly set (fixes #2578, #2642) - [x] Fix falls back to argparse convention: positional args use `dest`, optional args use `dest.upper()` - [x] Code review and CodeQL security scan both pass - [x] Draft PR #2671 created - [x] CI is in `action_required` state (needs maintainer approval - standard for Copilot PRs) **Other CI failures found on main (documented below, no simple fix in charmcraft):** - [x] `snap-store-tests` failing: Charmhub credentials expired (infrastructure issue) - [x] `snap-tests (ubuntu-22.04/20.04)`: `smoketests/different-dir-metadata` fails due to craft_providers snapd initialization issue (upstream issue in craft_providers; see PR #2509) - [x] `snap-tests (ubuntu-26.04)`: Transient apt package unavailability on Ubuntu devel daily builds (`gcc` and `python3-dev` not found) — not fixable in charmcraft - [x] Spread tests have been failing consistently since at least March 2026 (all due to upstream issues)

Evaluation history

Date Model Scores Action Summary
~deepseek/deepseek-pro-latest
Impact: 35
Quick Win: 24
Complexity: 15
Confidence: 82
Actionability: 80
needs review Fixes gen_cli_docs.py so required-argument metavars no longer render as <None> in CLI usage docs, falling back to argparse conventions (dest for positional, dest.upper() for optional). Approved, awaiting merge.
qwen/qwen3.6-35b-a3b
Impact: 25
Quick Win: 19
Complexity: 10
Confidence: 85
Actionability: 85
needs review Fixes CLI usage docs showing parameter names as <None> by falling back to argparse dest conventions. Approved, CI passing for relevant tests, infrastructure failures documented.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 27
Staleness: 40
Complexity: 10
Confidence: 80
needs review Fixes gen_cli_docs.py so required-argument metavars fall back to argparse conventions (dest / dest.upper()) instead of rendering as <None> in CLI usage docs. +10/-1 in one file; approved, CI green except pre-existing infra failures; unmerged ~51 days.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 22
Staleness: 45
Complexity: 10
Confidence: 80
needs review Fixes gen_cli_docs.py so required argument metavars fall back to argparse conventions (dest / dest.upper()) instead of rendering as <None> in CLI usage docs. +10/-1, approved, 0 unresolved comments; CI in action_required state awaiting maintainer approval.
qwen3.6-35b-a3b-mtp-q6
Staleness: 35
Complexity: 10
Confidence: 90
needs review Fixes CLI documentation generation bug where required argument metavars display as <None>. Applies argparse fallback conventions. Approved by reviewer, CI passing except for known infrastructure failures.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 20
Confidence: 85
needs review Fixes CLI usage docs where required argument metavars display as <None> by falling back to argparse conventions. Currently a draft PR awaiting maintainer approval for CI.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 20
Confidence: 80
needs review Fixes CLI usage docs where required argument metavars incorrectly display as <None>. Updates gen_cli_docs.py to fallback to argparse conventions. Currently awaiting maintainer approval in CI.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: charmcraft#2578 (confidence 90%)

    Issue reports <None> placeholders in charmcraft release usage docs, which this PR's metavar fallback directly addresses.

  • Likely Fixed By: charmcraft#2642 (confidence 90%)

    Duplicate report of the same None-in-docs bug, explicitly referenced in the PR body.

Related issues

No related issues found above the similarity threshold.