Skip to content

Commit f0ad6d7

Browse files
chore: update doc
1 parent 3746e62 commit f0ad6d7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cmd2/annotated.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ def do_paint(
8484
Note: ``Path`` and ``Enum`` annotations with ``@with_annotated`` also get
8585
automatic tab completion via generated parser metadata.
8686
If a user-supplied ``choices_provider`` or ``completer`` is set on an argument,
87-
it always takes priority over the type-inferred completion. For ``Enum`` and
88-
``Literal``, the restrictive type converter is also stripped so user-supplied
89-
values are not rejected at parse time. The ``Path`` converter is permissive
90-
and is preserved when a custom completer is provided.
87+
it drives completion in place of the inferred static ``choices``. The inferred
88+
``type`` converter is kept, so values still coerce to the declared type (an
89+
``Enum`` to its member, ``Literal[1, 2]`` to ``int``) and values outside the
90+
declared type are rejected at parse time.
9191
9292
The parameter name ``cmd2_handler`` is reserved for base commands declared with
9393
``with_annotated(base_command=True)`` and may not be used elsewhere.

0 commit comments

Comments
 (0)