feat(help): enhance CLI help rendering with Panels and TLDR validation
- Updated `Command.help_signature` to return a `(Panel, description)` tuple, enabling richer Rich-based help output with formatted panels. - Integrated `program` context into commands to display accurate CLI invocation (`falyx run …`) depending on mode (RUN, PREVIEW, RUN_ALL). - Refactored `_show_help` to print `Panel`-styled usage and descriptions instead of table rows. - Added `program` and `options_manager` propagation to built-in commands (Exit, History, Help) for consistent CLI display. - Improved `CommandArgumentParser.add_tldr_examples()` with stricter validation (`all()` instead of `any()`), and added new TLDR tests for coverage. - Simplified parser epilog text to `Tip: Use 'falyx run ?' to show available commands.` - Added tests for required `Argument` fields and TLDR examples. - Bumped version to 0.1.73.
This commit is contained in:
@ -88,3 +88,11 @@ def test_argument_equality():
|
||||
assert arg != "not an argument"
|
||||
assert arg is not None
|
||||
assert arg != object()
|
||||
|
||||
|
||||
def test_argument_required():
|
||||
arg = Argument("--foo", dest="foo", required=True)
|
||||
assert arg.required is True
|
||||
|
||||
arg2 = Argument("--bar", dest="bar", required=False)
|
||||
assert arg2.required is False
|
||||
|
Reference in New Issue
Block a user