Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metavars for improved docstring rendering #252

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions spin/cmds/meson.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,20 @@ def _check_coverage_tool_installation(coverage_type: GcovReportFormat, build_dir
"--build-dir",
default="build",
show_envvar=True,
metavar="BUILD_DIR",
envvar="SPIN_BUILD_DIR",
help="Meson build directory; package is installed into './{build-dir}-install'.",
)


@click.command()
@click.option("-j", "--jobs", help="Number of parallel tasks to launch", type=int)
@click.option(
"-j",
"--jobs",
metavar="N_JOBS",
help="Number of parallel tasks to launch",
type=int,
)
@click.option("--clean", is_flag=True, help="Clean build directory before build")
@click.option(
"-v", "--verbose", is_flag=True, help="Print detailed build and installation output"
Expand All @@ -261,6 +268,7 @@ def _check_coverage_tool_installation(coverage_type: GcovReportFormat, build_dir
"--prefix",
help="The build prefix, passed directly to meson.",
type=str,
metavar="PREFIX",
default=DEFAULT_PREFIX,
)
@click.argument("meson_args", nargs=-1)
Expand Down Expand Up @@ -625,7 +633,9 @@ def test(


@click.command()
@click.option("--code", "-c", help="Python program passed in as a string")
@click.option(
"--code", "-c", metavar="CODE", help="Python program passed in as a string"
)
@click.argument("gdb_args", nargs=-1)
@build_dir_option
@click.pass_context
Expand Down Expand Up @@ -872,7 +882,13 @@ def attach_sigint():
default=True,
help="Sphinx gallery: enable/disable plots",
)
@click.option("--jobs", "-j", default="auto", help="Number of parallel build jobs")
@click.option(
"--jobs",
"-j",
default="auto",
metavar="N_JOBS",
help="Number of parallel build jobs",
)
@build_dir_option
@click.pass_context
def docs(
Expand Down Expand Up @@ -975,7 +991,9 @@ def docs(


@click.command()
@click.option("--code", "-c", help="Python program passed in as a string")
@click.option(
"--code", "-c", metavar="CODE", help="Python program passed in as a string"
)
@click.argument("lldb_args", nargs=-1)
@build_dir_option
@click.pass_context
Expand Down
Loading