Skip to content

Commit 200a00d

Browse files
chore: mark experimental
1 parent acb79b7 commit 200a00d

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

cmd2/annotated.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
"""Build argparse parsers from type-annotated function signatures.
22
3+
.. warning:: Experimental
4+
5+
This module is experimental and its behaviour may change in future releases.
6+
37
This module provides the :func:`with_annotated` decorator that inspects a
48
command function's type hints and default values to automatically construct
59
a ``Cmd2ArgumentParser``. It also provides :class:`Argument` and

cmd2/decorators.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ def with_annotated(
355355
) -> Any:
356356
"""Decorate a ``do_*`` method to build its argparse parser from type annotations.
357357
358+
.. warning:: Experimental -- behaviour may change in future releases.
359+
358360
:param func: the command function (when used without parentheses)
359361
:param ns_provider: optional callable returning a prepopulated argparse.Namespace
360362
:param preserve_quotes: if True, preserve quotes in arguments

docs/features/argument_processing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ stores internally. A consequence is that parsers don't need to be unique across
5757

5858
## with_annotated decorator
5959

60+
!!! warning "Experimental"
61+
62+
`@with_annotated` is experimental and its behaviour may change in future releases. If you
63+
encounter issues, please report them and consider using `@with_argparser` as a stable alternative.
64+
6065
The [@with_annotated][cmd2.decorators.with_annotated] decorator builds an argparse parser
6166
automatically from the decorated function's type annotations. No manual `add_argument()` calls are
6267
required.

0 commit comments

Comments
 (0)