File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,10 +84,10 @@ def do_paint(
8484Note: ``Path`` and ``Enum`` annotations with ``@with_annotated`` also get
8585automatic tab completion via generated parser metadata.
8686If 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
9292The parameter name ``cmd2_handler`` is reserved for base commands declared with
9393``with_annotated(base_command=True)`` and may not be used elsewhere.
You can’t perform that action at this time.
0 commit comments