Skip to content

Commit

Permalink
remove python 3.7 tabs for reusable completer example
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Dec 5, 2024
1 parent c2ffc6b commit 46c406b
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions docs/tutorial/options-autocompletion.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,27 +270,7 @@ You may want to reuse completer functions across CLI applications or within the

We can declare a parameter of type <a href="https://click.palletsprojects.com/en/stable/api/#click.Parameter" class="external-link" target="_blank">click.Parameter</a> along with the `click.Context` in our completer function to determine this. For example, lets revisit our above context example where we filter out duplicates but add a second greeter argument that reuses the same completer function:

//// tab | Python 3.7+

```Python hl_lines="15-16"
{!> ../docs_src/options_autocompletion/tutorial010_an.py!}
```

////

//// tab | Python 3.7+ non-Annotated

/// tip

Prefer to use the `Annotated` version if possible.

///

```Python hl_lines="14-15"
{!> ../docs_src/options_autocompletion/tutorial010.py!}
```

////
{* docs_src/options_autocompletion/tutorial010_an.py hl[15:16] *}

/// tip

Expand Down

0 comments on commit 46c406b

Please sign in to comment.