pallets / pallets/click

missing documentation: testing of shell completion

Open
#2,299 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
17.7k
Forks
2.3k
Avg merge
1d 30m
Merged PRs (30d)
18

Description

I currently migrate an application to click 8.x and have to migrate all the completion functions as well as the test code for shell completion.

My working code for click 7.x shell completion testing is based on @davidism answer on this post https://github.com/pallets/click/issues/1453 2 years ago and worked fine.

However, with click 8.x, there is no get_choices anymore and the documentation at
https://click.palletsprojects.com/en/8.1.x/testing/ does not mention shell completion testing.

Can you give me a new example or a link please?

This time I will prepare an MR for https://github.com/pallets/click/blob/8.1.x/docs/testing.rst :-)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/testing.rst and the Click 8.1.x testing documentation, then compare the older get_choices-based approach described in issue 1453 with the Click 8.x completion APIs. Done means adding a current shell-completion testing example or an authoritative link to the testing documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.