Skip to content

Check that CLI examples use full option names - #10829

Open
luigi617 wants to merge 1 commit into
v2from
code-example-ci-12
Open

luigi617 wants to merge 1 commit into
v2from
code-example-ci-12

Conversation

@luigi617

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:
Check that CLI examples use full option names and fix existing violations

The CLI accepts an abbreviated option such as --max-it for --max-items, so the example command check passed them, but the abbreviation stops working if the command gets another option with the same prefix.

  • Added test_example_option_names to tests/functional/docs/test_examples.py: every option in an example command must be the full name of an option of that command or a global option
  • Fixed 96 abbreviated options in 80 example files, e.g. --endpoint for --endpoint-url, --filter for --filters, --repo for --repository

Testing

  • Run pytest tests/functional/docs/test_examples.py -n auto
=== 70149 passed in 34.20s =====

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@luigi617
luigi617 requested a review from a team as a code owner October 30, 2026 17:52
@luigi617
luigi617 added this pull request to stack #10833 October 30, 2026 21:24

This branch has not been deployed

No deployments
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.

2 participants