Skip to content

Does a rich_argparse example fit in the documentation anywhere? #2

@peterjc

Description

@peterjc

I was pleased to find I could combine yapx with rich_argparse (from https://github.com/hamdanal/rich-argparse ) as follows:

from rich_argparse import RichHelpFormatter
import yapx

def say_hello(name: str = 'World'):
    print(f"Hello {name}")

yapx.run(say_hello, formatter_class=RichHelpFormatter)

Sample output with the colours done via rich (cropped):

Screenshot 2024-11-05 at 19 29 50

Can you see where this might fit in the yapx documentation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions