Update formatting for help text

This commit is contained in:
grym 2024-01-06 11:23:34 -05:00
parent 8468e3b6c7
commit 3b3c7a850a
3 changed files with 41 additions and 39 deletions

View File

@ -24,5 +24,5 @@ test: install
@$(VENV_BIN)/pytest --cov=dev_utils ./tests @$(VENV_BIN)/pytest --cov=dev_utils ./tests
docs: install docs: install
@$(VENV_BIN)/cog -r ./README.md @TERMINAL_WIDTH=80 $(VENV_BIN)/cog -r ./README.md
@$(VENV_BIN)/scriv collect @$(VENV_BIN)/scriv collect

View File

@ -20,20 +20,24 @@ cog.outl("```")
Usage: dev-utils [OPTIONS] COMMAND [ARGS]... Usage: dev-utils [OPTIONS] COMMAND [ARGS]...
A collection of provisioning tools for common tasks during (mostly python) development. A collection of provisioning tools for common tasks during (mostly python)
development.
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ ╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --version Show the version and exit. │ │ --version Show the version and exit. │
│ --install-completion Install completion for the current shell. │ │ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │ │ --show-completion Show completion for the current shell, to copy │
│ --help Show this message and exit. │ │ it or customize the installation. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │ --help Show this message and exit. │
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ ╰──────────────────────────────────────────────────────────────────────────────╯
│ direnv Emit the contents of a .envrc file suitable for python development. │ ╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ direnv-init Configure the user's direnv rc file │ │ direnv Emit the contents of a .envrc file suitable for python │
│ precommit If precommit is available, run it until it succeeds or `max_tries` is exceeded. │ │ development. │
│ venv Make a venv │ │ direnv-init Configure the user's direnv rc file │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │ precommit If precommit is available, run it until it succeeds or │
`max_tries` is exceeded. │
│ venv Make a venv │
╰──────────────────────────────────────────────────────────────────────────────╯
``` ```
<!-- [[[end]]] --> <!-- [[[end]]] -->
@ -54,12 +58,13 @@ for subname in _subcommand_names:
Usage: dev-utils precommit [OPTIONS] Usage: dev-utils precommit [OPTIONS]
If precommit is available, run it until it succeeds or `max_tries` is exceeded. If precommit is available, run it until it succeeds or `max_tries` is
exceeded.
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --max-tries INTEGER [default: 3] │ --max-tries INTEGER [default: 3] │
│ --help Show this message and exit. │ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ╰──────────────────────────────────────────────────────────────────────────────╯
``` ```
## dev-utils venv ## dev-utils venv
@ -69,12 +74,12 @@ for subname in _subcommand_names:
Make a venv Make a venv
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --base-python TEXT [default: None] │ --base-python TEXT [default: None] │
│ --name TEXT [default: venv] │ --name TEXT [default: venv] │
│ --do-update --no-do-update [default: do-update] │ --do-update --no-do-update [default: do-update] │
│ --help Show this message and exit. │ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ╰──────────────────────────────────────────────────────────────────────────────╯
``` ```
## dev-utils direnv-init ## dev-utils direnv-init
@ -84,11 +89,12 @@ for subname in _subcommand_names:
Configure the user's direnv rc file Configure the user's direnv rc file
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ ╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --replace --no-replace [default: no-replace] │ │ --replace --no-replace [default: no-replace] │
│ --target-dir PATH [default: /Users/gvoysey/.config/direnv] │ │ --target-dir PATH [default: │
│ --help Show this message and exit. │ │ /Users/gvoysey/.config/direnv] │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
``` ```
## dev-utils direnv ## dev-utils direnv
@ -98,10 +104,10 @@ for subname in _subcommand_names:
Emit the contents of a .envrc file suitable for python development. Emit the contents of a .envrc file suitable for python development.
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --python-version TEXT [default: None] │ --python-version TEXT [default: None] │
│ --help Show this message and exit. │ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ╰──────────────────────────────────────────────────────────────────────────────╯
``` ```
<!-- [[[end]]] --> <!-- [[[end]]] -->

View File

@ -13,11 +13,7 @@ from dev_utils import __version__
IS_WINDOWS = sys.platform == "win32" IS_WINDOWS = sys.platform == "win32"
app = typer.Typer( app = typer.Typer()
context_settings={
"max_content_width": 80,
}
)
def version_callback(value: bool): def version_callback(value: bool):