Coverage for tests / assets / hidden_commands.py: 100%
12 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-09 00:15 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-09 00:15 +0000
1import typer 1abcdefg
3app = typer.Typer() 1abcdefg
6@app.command() 1abcdefg
7def visible(): 1abcdefg
8 """Visible command."""
11@app.command(hidden=True) 1abcdefg
12def hidden_decorated(): 1abcdefg
13 """Hidden via @app.command(hidden=True)."""
16def hidden_var(): 1abcdefg
17 """Hidden via app.command(name, hidden=True)(fn)."""
20app.command("hidden-var", hidden=True)(hidden_var) 1abcdefg
22hidden_subgroup = typer.Typer(hidden=True) 1abcdefg
25@hidden_subgroup.command() 1abcdefg
26def sub(): 1abcdefg
27 """Hidden subgroup command."""
30app.add_typer(hidden_subgroup, name="hidden-subgroup") 1abcdefg