Skip to content

Validate unknown task names in info - #505

Open
jihtsan wants to merge 1 commit into
pydoit:masterfrom
jihtsan:codex/503-info-unknown-task
Open

jihtsan wants to merge 1 commit into
pydoit:masterfrom
jihtsan:codex/503-info-unknown-task

Conversation

@jihtsan

@jihtsan jihtsan commented Oct 27, 2026

Copy link
Copy Markdown

Validate the selected task name before info looks it up. Unknown names now produce the normal InvalidCommand message (ERROR: 'missing' is not a task.), with and without --no-status, instead of an internal KeyError traceback. Valid task output and the existing zero/multiple-selection checks are unchanged.

Closes #503.

Validation on CPython 3.13.12: the new regression fails on the baseline with a KeyError in both status modes; the full rut -vv suite then passes (832 tests). doit pyflakes, doit codestyle and git diff --check pass. Real CLI probes confirm the concise error/exit code 3 for unknown names in both modes and successful output/exit code 0 for a valid task. Independent fixed-SHA Standards and Spec reviews report no findings.

Other Python versions/platforms and hosted CI were not verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

info with an unknown task raises KeyError instead of InvalidCommand

1 participant