Skip to content

Horizontal lines in help output do not consider terminal width #3

Description

@peterjc

Consider this example based on that in #2,

from typing import Annotated
import yapx


def say_hello(
    name: Annotated[
        str, yapx.arg(help="Who or what to greet?", metavar="NAME")
    ] = "World",
):
    print(f"Hello {name}")


yapx.run(say_hello)

The output is fine if the terminal is at least 80 characters wide. However, it does not check and the horizontal lines wrap on a narrower terminal:

Screenshot 2024-11-05 at 20 49 00

Testing with yapx 0.5.3 on macOS with Python 3.12

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions