Skip to content

Commit

Permalink
Bump version, fix subcommand example docs/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Oct 11, 2024
1 parent 80b1316 commit f762059
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
Decorator-based Subcommands
==========================================

:func:`tyro.extras.app.command()` and :func:`tyro.extras.app.cli()` provide a
decorator-based API for subcommands, which is inspired by `click
<https://click.palletsprojects.com/>`_.
:func:`tyro.extras.SubcommandApp()` provides a decorator-based API for
subcommands, which is inspired by `click <https://click.palletsprojects.com/>`_.


.. code-block:: python
Expand Down
5 changes: 2 additions & 3 deletions examples/04_additional/15_decorator_subcommands.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Decorator-based Subcommands
:func:`tyro.extras.app.command()` and :func:`tyro.extras.app.cli()` provide a
decorator-based API for subcommands, which is inspired by `click
<https://click.palletsprojects.com/>`_.
:func:`tyro.extras.SubcommandApp()` provides a decorator-based API for
subcommands, which is inspired by `click <https://click.palletsprojects.com/>`_.
Usage:
`python my_script.py --help`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "tyro"
authors = [
{name = "brentyi", email = "[email protected]"},
]
version = "0.8.11" # TODO: currently needs to be synchronized manually with __init__.py.
version = "0.8.12" # TODO: currently needs to be synchronized manually with __init__.py.
description = "Strongly typed, zero-effort CLI interfaces"
readme = "README.md"
license = { text="MIT" }
Expand Down
2 changes: 1 addition & 1 deletion src/tyro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@


# TODO: this should be synchronized automatically with the pyproject.toml.
__version__ = "0.8.11"
__version__ = "0.8.12"
2 changes: 1 addition & 1 deletion src/tyro/extras/_subcommand_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def cli(
description: Optional[str] = None,
args: Optional[Sequence[str]] = None,
use_underscores: bool = False,
sort_subcommands: bool = True,
sort_subcommands: bool = False,
) -> Any:
"""Run the command-line interface.
Expand Down

0 comments on commit f762059

Please sign in to comment.